feat(Status): Better provider info and show filter info

This commit is contained in:
hedy
2023-11-19 16:59:49 +08:00
parent 4834db0802
commit 3b27272319
5 changed files with 48 additions and 11 deletions

View File

@@ -629,9 +629,16 @@ end
function M.show_status()
---@type outline.StatusContext
local ctx = {}
local ctx = { priority = cfg.o.providers.priority }
if vim.api.nvim_buf_is_valid(M.state.code_buf) then
ctx.ft = vim.api.nvim_buf_get_option(M.state.code_buf, 'ft')
end
ctx.filter = cfg.o.symbols.user_config_filter[ctx.ft]
ctx.default_filter = cfg.o.symbols.user_config_filter.default
local p = _G._outline_current_provider
if not M.is_focus_in_outline() then
if not M.view or not M.view:is_open() then
p = providers.find_provider()
end