From e92cf5bdb399dadee17a1885261c6c9fd886db30 Mon Sep 17 00:00:00 2001 From: Dan Anglin Date: Mon, 13 Feb 2023 08:15:28 +0000 Subject: [PATCH] fix(lsp): add GOFLAGS environment setting to gopls Add GOFLAGS environment setting to gopls and add the 'mage' tag so that gopls works with magefiles. --- nvim/lua/plugins/config/lsp.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nvim/lua/plugins/config/lsp.lua b/nvim/lua/plugins/config/lsp.lua index 1efc4de..a267b8d 100644 --- a/nvim/lua/plugins/config/lsp.lua +++ b/nvim/lua/plugins/config/lsp.lua @@ -48,6 +48,9 @@ lspconfig.gopls.setup{ analyses = { unusedparams = true, }, + env = { + GOFLAGS = "-tags=mage" + }, gofumpt = true, staticcheck = true, },