From b4da76be54691e854d3e0e02c36b0245f945c2c7 Mon Sep 17 00:00:00 2001 From: chupson Date: Mon, 12 May 2025 03:21:28 +0200 Subject: [PATCH] fix(lsp): stop using deprecated `client.supports_method` function (#3468) --- lua/telescope/builtin/__lsp.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lua/telescope/builtin/__lsp.lua b/lua/telescope/builtin/__lsp.lua index d51bb6c..0d268ae 100644 --- a/lua/telescope/builtin/__lsp.lua +++ b/lua/telescope/builtin/__lsp.lua @@ -506,8 +506,14 @@ local function check_capabilities(method, bufnr) local clients = get_clients { bufnr = bufnr } for _, client in pairs(clients) do - if client.supports_method(method, { bufnr = bufnr }) then - return true + if vim.fn.has "nvim-0.11" == 1 then + if client:supports_method(method, bufnr) then + return true + end + else + if client.supports_method(method, { bufnr = bufnr }) then + return true + end end end