From a7d7ee0e0f447e6a4657ffaea4337ad11e056ea4 Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Wed, 26 Jun 2024 20:50:11 +0200 Subject: [PATCH] chore(nvim): gopls watch files --- vim/lua/lsp_config.lua | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/vim/lua/lsp_config.lua b/vim/lua/lsp_config.lua index f4ad943..191d1a4 100644 --- a/vim/lua/lsp_config.lua +++ b/vim/lua/lsp_config.lua @@ -54,7 +54,7 @@ nvim_lsp.gopls.setup({ settings = { gopls = { staticcheck = true, - -- Disalbing linksInHover may not be working as expected: + -- Disabling linksInHover may not be working as expected: linksInHover = false, usePlaceholders = true, experimentalPostfixCompletions = true, @@ -65,12 +65,23 @@ nvim_lsp.gopls.setup({ unusedresult = true, nilness = true, }, + buildFlags = { "-tags=acceptance" } }, }, init_options = { usePlaceholders = true, }, - capabilities = capabilities, + capabilities = vim.tbl_extend( + "error", + capabilities, + { + workspace = { + didChangeWatchedFiles = { + dynamicRegistration = true + } + } + } + ), on_attach = on_attach, })