From b60feb8dd2e6f619311fc6f303f802457852ad92 Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Tue, 13 Feb 2024 23:39:14 +0530 Subject: [PATCH] rearrange stuff --- after/plugin/lsp.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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)