@@ -109,13 +109,26 @@ return {
109109 -- For example, in C this would take you to the header.
110110 map (' gD' , vim .lsp .buf .declaration , ' [G]oto [D]eclaration' )
111111
112+ -- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10)
113+ --- @param client vim.lsp.Client
114+ --- @param method vim.lsp.protocol.Method
115+ --- @param bufnr ? integer some lsp support methods only in specific files
116+ --- @return boolean
117+ local function client_supports_method (client , method , bufnr )
118+ if vim .fn .has ' nvim-0.11' == 1 then
119+ return client :supports_method (method , bufnr )
120+ else
121+ return client .supports_method (method , { bufnr = bufnr })
122+ end
123+ end
124+
112125 -- The following two autocommands are used to highlight references of the
113126 -- word under your cursor when your cursor rests there for a little while.
114127 -- See `:help CursorHold` for information about when this is executed
115128 --
116129 -- When you move your cursor, the highlights will be cleared (the second autocommand).
117130 local client = vim .lsp .get_client_by_id (event .data .client_id )
118- if client and client : supports_method ( vim .lsp .protocol .Methods .textDocument_documentHighlight ) then
131+ if client and client_supports_method ( client , vim .lsp .protocol .Methods .textDocument_documentHighlight , event . buf ) then
119132 local highlight_augroup = vim .api .nvim_create_augroup (' kickstart-lsp-highlight' , { clear = false })
120133 vim .api .nvim_create_autocmd ({ ' CursorHold' , ' CursorHoldI' }, {
121134 buffer = event .buf ,
@@ -142,7 +155,7 @@ return {
142155 -- code, if the language server you are using supports them
143156 --
144157 -- This may be unwanted, since they displace some of your code
145- if client and client : supports_method ( vim .lsp .protocol .Methods .textDocument_inlayHint ) then
158+ if client and client_supports_method ( client , vim .lsp .protocol .Methods .textDocument_inlayHint , event . buf ) then
146159 map (' <leader>th' , function ()
147160 vim .lsp .inlay_hint .enable (not vim .lsp .inlay_hint .is_enabled { bufnr = event .buf })
148161 end , ' [T]oggle Inlay [H]ints' )
@@ -245,6 +258,8 @@ return {
245258 require (' mason-tool-installer' ).setup { ensure_installed = ensure_installed }
246259
247260 require (' mason-lspconfig' ).setup {
261+ ensure_installed = {}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer)
262+ automatic_installation = false ,
248263 handlers = {
249264 function (server_name )
250265 local server = servers [server_name ] or {}
0 commit comments