diff --git a/lua/custom/lsp.lua b/lua/custom/lsp.lua index 3ab8d79..2f6d1ac 100644 --- a/lua/custom/lsp.lua +++ b/lua/custom/lsp.lua @@ -1,4 +1,4 @@ -local lspconfig = require("lspconfig") +-- Using vim.lsp.config() instead of require('lspconfig') (nvim-lspconfig >= 0.11) local keymap = vim.keymap @@ -147,9 +147,12 @@ for name, config in pairs(servers) do capabilities = capabilities, }, config) - lspconfig[name].setup(config) + vim.lsp.config(name, config) end +-- Enable the configured servers +vim.lsp.enable(vim.tbl_keys(servers)) + -- Here it is used the LSP server attaches to file vim.api.nvim_create_autocmd("LspAttach", { -- Grouping together autocommands.