Support neovim < 0.10 for lsp.get_clients

This commit is contained in:
~hedy
2024-06-05 20:54:26 +08:00
parent e6afff238c
commit 193e03a7b7
3 changed files with 12 additions and 2 deletions

View File

@@ -35,7 +35,11 @@ local function get_appropriate_client(bufnr, capability)
local clients, use_client
if _G._outline_nvim_has[8] then
clients = l.get_clients({ bufnr = bufnr })
if _G._outline_nvim_has[10] then
clients = l.get_clients({ bufnr = bufnr })
else
clients = l.get_active_clients({ bufnr = bufnr })
end
for _, client in ipairs(clients) do
if _check_client(client, capability) then
use_client = client