@@ -520,7 +520,7 @@ require('lazy').setup({
520520
521521 -- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10)
522522 --- @param client vim.lsp.Client
523- --- @param method vim.lsp.protocol.Method
523+ --- @param method vim.lsp.protocol.Method.ClientToServer
524524 --- @param bufnr ? integer some lsp support methods only in specific files
525525 --- @return boolean
526526 local function client_supports_method (client , method , bufnr )
@@ -537,7 +537,7 @@ require('lazy').setup({
537537 --
538538 -- When you move your cursor, the highlights will be cleared (the second autocommand).
539539 local client = vim .lsp .get_client_by_id (event .data .client_id )
540- if client and client_supports_method (client , vim . lsp . protocol . Methods . textDocument_documentHighlight , event .buf ) then
540+ if client and client_supports_method (client , ' textDocument/documentHighlight ' , event .buf ) then
541541 local highlight_augroup = vim .api .nvim_create_augroup (' kickstart-lsp-highlight' , { clear = false })
542542 vim .api .nvim_create_autocmd ({ ' CursorHold' , ' CursorHoldI' }, {
543543 buffer = event .buf ,
@@ -564,7 +564,7 @@ require('lazy').setup({
564564 -- code, if the language server you are using supports them
565565 --
566566 -- This may be unwanted, since they displace some of your code
567- if client and client_supports_method (client , vim . lsp . protocol . Methods . textDocument_inlayHint , event .buf ) then
567+ if client and client_supports_method (client , ' textDocument/inlayHint ' , event .buf ) then
568568 map (' <leader>th' , function ()
569569 vim .lsp .inlay_hint .enable (not vim .lsp .inlay_hint .is_enabled { bufnr = event .buf })
570570 end , ' [T]oggle Inlay [H]ints' )
0 commit comments