From 8a6e2162a2f7e8fc6f9b2cdecfa3d0cf52e2c83d Mon Sep 17 00:00:00 2001 From: talayhan Date: Mon, 7 Oct 2024 21:46:21 -0700 Subject: [PATCH] [lsp] Add gopls config --- config/nvim/lua/lsp.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/config/nvim/lua/lsp.lua b/config/nvim/lua/lsp.lua index be55b63..05f4ee0 100644 --- a/config/nvim/lua/lsp.lua +++ b/config/nvim/lua/lsp.lua @@ -89,6 +89,18 @@ require('lspconfig')['ts_ls'].setup { settings = {} } +require('lspconfig')['gopls'].setup { + settings = { + gopls = { + analyses = { + unusedparams = true, + }, + staticcheck = true, + gofumpt = true, + }, + }, +} + vim.api.nvim_create_user_command("DiagnosticToggle", function() local config = vim.diagnostic.config local vt = config().virtual_text