Skip to content

Commit 139dc04

Browse files
committed
fix: remove usages of deprecated vim.lsp.protocol.Methods
1 parent 3338d39 commit 139dc04

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

init.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ require('lazy').setup({
591591
--
592592
-- When you move your cursor, the highlights will be cleared (the second autocommand).
593593
local client = vim.lsp.get_client_by_id(event.data.client_id)
594-
if client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_documentHighlight, event.buf) then
594+
if client and client_supports_method(client, 'textDocument/documentHighlight', event.buf) then
595595
local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false })
596596
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
597597
buffer = event.buf,
@@ -618,7 +618,7 @@ require('lazy').setup({
618618
-- code, if the language server you are using supports them
619619
--
620620
-- This may be unwanted, since they displace some of your code
621-
if client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_inlayHint, event.buf) then
621+
if client and client_supports_method(client, 'textDocument/inlayHint', event.buf) then
622622
map('<leader>th', function()
623623
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf })
624624
end, '[T]oggle Inlay [H]ints')

0 commit comments

Comments
 (0)