diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua index e1bb749..33569ac 100644 --- a/after/plugin/lsp.lua +++ b/after/plugin/lsp.lua @@ -2,15 +2,20 @@ require("lspkind").init({ mode = "symbol_text", }) +local vim_lsp_capabilities = vim.lsp.protocol.make_client_capabilities() local lsp_capabilities = vim.tbl_deep_extend( "force", require("cmp_nvim_lsp").default_capabilities(), - vim.lsp.protocol.make_client_capabilities(), + vim_lsp_capabilities, { workspace = { didChangeConfiguration = { dynamicRegistration = true } } } ) local lspconfig = require("lspconfig") +lspconfig.gopls.setup({ + capabilities = lsp_capabilities, +}) + lspconfig.lua_ls.setup({ capabilities = lsp_capabilities, on_init = function(client) @@ -39,10 +44,6 @@ lspconfig.nixd.setup({ capabilities = lsp_capabilities, }) -lspconfig.gopls.setup({ - capabilities = lsp_capabilities, -}) - vim.keymap.set("n", "", vim.diagnostic.goto_prev) vim.keymap.set("n", "", vim.diagnostic.goto_next)