@@ -210,13 +210,13 @@ return {
210210 -- By default, Neovim doesn't support everything that is in the LSP specification.
211211 -- When you add blink.cmp, luasnip, etc. Neovim now has *more* capabilities.
212212 -- So, we create new capabilities with blink.cmp, and then broadcast that to the servers.
213- local capabilities = require (' blink.cmp' ).get_lsp_capabilities ()
213+ -- local capabilities = require('blink.cmp').get_lsp_capabilities()
214214 -- LSP servers and clients are able to communicate to each other what features they support.
215215 -- By default, Neovim doesn't support everything that is in the LSP specification.
216216 -- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
217217 -- So, we create new capabilities with nvim cmp, and then broadcast that to the servers.
218- -- local capabilities = vim.lsp.protocol.make_client_capabilities()
219- -- capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
218+ local capabilities = vim .lsp .protocol .make_client_capabilities ()
219+ capabilities = vim .tbl_deep_extend (' force' , capabilities , require (' cmp_nvim_lsp' ).default_capabilities ())
220220
221221 -- Ensure the servers and tools above are installed
222222 -- To check the current status of installed tools and/or manually install
@@ -245,11 +245,16 @@ return {
245245 require (' utils.mason' ).install (missing_lsps )
246246
247247 -- configure nvim lsp via lspconfig package for our list of lsps
248- local lspconfig = require ' lspconfig'
248+ -- local lspconfig = require 'lspconfig'
249249 for server , config in pairs (lsps ) do
250+ -- tbl_deep_extend with force -> on conflict use value from right
250251 config .capabilities = vim .tbl_deep_extend (' force' , {}, capabilities , config .capabilities or {})
251- -- config.on_attach = on_attach -- we don't need this because of the events
252- lspconfig [server ].setup (config )
252+
253+ -- the require(lspconfig)[server].setup({...}) notation is deprecated in nvim-lspconfig
254+ -- Thus we use the new notation for setting up LSPs
255+ -- Part below is equivalent to require('lspconfig')[server].setup(config)
256+ vim .lsp .config (server , config )
257+ vim .lsp .enable (server )
253258 end
254259 end ,
255260 },
0 commit comments