(nvim) resolve client.suports_method deprecation warning

This commit is contained in:
juancwu 2026-04-12 18:24:37 +00:00
commit e4e25b5b8a

View file

@ -22,7 +22,7 @@ vim.api.nvim_create_autocmd("LspAttach", {
map("]d", vim.diagnostic.goto_next, "Go to next diagnostic")
local client = vim.lsp.get_client_by_id(event.data.client_id)
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
if client and client:supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
local highlight_augroup = vim.api.nvim_create_augroup("kickstart-lsp-highlight", { clear = false })
vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
buffer = event.buf,