chore: Fix remants of rename

This commit is contained in:
hedy
2023-11-15 11:28:09 +08:00
parent d78d0a0b50
commit 81ebdc5714
3 changed files with 6 additions and 8 deletions

View File

@@ -234,7 +234,7 @@ function M.resolve_config()
end
function M.setup(options)
vim.g.symbols_outline_loaded = 1
vim.g.outline_loaded = 1
M.o = vim.tbl_deep_extend('force', {}, M.defaults, options or {})
local guides = M.o.guides
if type(guides) == 'boolean' and guides then

View File

@@ -527,8 +527,6 @@ function M.open_outline(opts)
local found = providers.request_symbols(handler, opts)
if not found then
vim.notify("[outline]: No providers found for current buffer", vim.log.levels.WARN)
-- else
-- print("Using provider ".._G._symbols_outline_current_provider.name.."...")
end
end
end
@@ -591,7 +589,7 @@ end
function M.show_status()
if M.has_provider() then
print("Current provider:")
print(' ' .. _G._symbols_outline_current_provider.name)
print(' ' .. _G._outline_current_provider.name)
if M.view:is_open() then
print("Outline window is open.")
else
@@ -612,9 +610,9 @@ end
function M.has_provider()
local winid = vim.fn.win_getid()
if M.view:is_open() and winid == M.view.winnr then
return _G._symbols_outline_current_provider ~= nil
return _G._outline_current_provider ~= nil
end
return providers.has_provider() and _G._symbols_outline_current_provider
return providers.has_provider() and _G._outline_current_provider
end
local function setup_commands()

View File

@@ -32,8 +32,8 @@ function M.request_symbols(on_symbols, opts)
for _, value in ipairs(providers) do
local provider = require(value)
if provider.should_use_provider(0) then
_G._symbols_outline_current_provider = provider
_G._symbols_outline_current_provider.name = value
_G._outline_current_provider = provider
_G._outline_current_provider.name = value
provider.request_symbols(on_symbols, opts)
return true
end