Skip to content

Commit b4da76b

Browse files
authored
fix(lsp): stop using deprecated client.supports_method function (nvim-telescope#3468)
1 parent a4ed825 commit b4da76b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lua/telescope/builtin/__lsp.lua

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,14 @@ local function check_capabilities(method, bufnr)
506506
local clients = get_clients { bufnr = bufnr }
507507

508508
for _, client in pairs(clients) do
509-
if client.supports_method(method, { bufnr = bufnr }) then
510-
return true
509+
if vim.fn.has "nvim-0.11" == 1 then
510+
if client:supports_method(method, bufnr) then
511+
return true
512+
end
513+
else
514+
if client.supports_method(method, { bufnr = bufnr }) then
515+
return true
516+
end
511517
end
512518
end
513519

0 commit comments

Comments
 (0)