diff --git a/lua/go/gopls.lua b/lua/go/gopls.lua index 4108d99..316a100 100644 --- a/lua/go/gopls.lua +++ b/lua/go/gopls.lua @@ -299,15 +299,24 @@ M.setups = function() preselectSupport = true, insertReplaceSupport = true, labelDetailsSupport = true, - snippetSupport = true, + snippetSupport = vim.snippet and true or false, resolveSupport = { properties = { + 'edit', 'documentation', 'details', 'additionalTextEdits', }, }, }, + completionList = { + itemDefaults = { + 'editRange', + 'insertTextFormat', + 'insertTextMode', + 'data', + }, + }, contextSupport = true, dynamicRegistration = true, }, diff --git a/lua/go/null_ls.lua b/lua/go/null_ls.lua index c547aad..e91e927 100644 --- a/lua/go/null_ls.lua +++ b/lua/go/null_ls.lua @@ -198,10 +198,10 @@ return { '--fix=false', '--out-format=json', } - for _, linter in ipairs(_GO_NVIM_CFG.null_ls.golangci_lint.disable) do + for _, linter in ipairs(_GO_NVIM_CFG.null_ls.golangci_lint.disable or {}) do table.insert(args, '--disable=' .. linter) end - for _, linter in ipairs(_GO_NVIM_CFG.null_ls.golangci_lint.enable) do + for _, linter in ipairs(_GO_NVIM_CFG.null_ls.golangci_lint.enable or {}) do table.insert(args, '--enable=' .. linter) end args = vim.list_extend(args, { '--path-prefix', '$ROOT', '$FILENAME' })