fix(providers): Ensure working on nvim-0.7
This commit removed the ability to receive symbols from all attached clients in the current buffer. Everything works as before when only one client is attached to a buffer. This also fixes outline LSP finding clients on nvim-0.7
This commit is contained in:
@@ -1,17 +1,19 @@
|
||||
local M = {}
|
||||
local import_prefix = 'outline/providers/'
|
||||
|
||||
---@return outline.Provider?
|
||||
---@return outline.Provider?, table?
|
||||
function M.find_provider()
|
||||
if not M.providers then
|
||||
M.providers = vim.tbl_map(function(p)
|
||||
return import_prefix .. p
|
||||
end, require('outline.config').get_providers())
|
||||
end
|
||||
|
||||
for _, path in ipairs(M.providers) do
|
||||
local provider = require(path)
|
||||
if provider.supports_buffer(0) then
|
||||
return provider
|
||||
local ok, info = provider.supports_buffer(0)
|
||||
if ok then
|
||||
return provider, info
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user