summaryrefslogtreecommitdiff
path: root/dot_config/nvim/lsp/gopls.lua
diff options
context:
space:
mode:
authorChloƩ Vulquin <code@toast.bunkerlabs.net>2025-04-02 13:55:07 +0200
committerChloƩ Vulquin <code@toast.bunkerlabs.net>2025-04-02 13:55:07 +0200
commitd2f4d5dec7eededffc956fe6745139d98d695509 (patch)
treeacd79555cdd16ae02794ce8b36bd0f153ee9d6b9 /dot_config/nvim/lsp/gopls.lua
parentnvim/conjure: move fennel support to nfnl (diff)
nvim: upgrade configs for v0.11
Bunch of stuff bundled with it. `lsp/` subject to changes.
Diffstat (limited to 'dot_config/nvim/lsp/gopls.lua')
-rw-r--r--dot_config/nvim/lsp/gopls.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/dot_config/nvim/lsp/gopls.lua b/dot_config/nvim/lsp/gopls.lua
new file mode 100644
index 0000000..dd32055
--- /dev/null
+++ b/dot_config/nvim/lsp/gopls.lua
@@ -0,0 +1,15 @@
+-- [nfnl] Compiled from lsp/gopls.fnl by https://github.com/Olical/nfnl, do not edit.
+local function _1_(buf, cb)
+ local function _2_()
+ local modr = vim.fs.root(buf, "go.mod")
+ local _3_
+ if modr then
+ _3_ = vim.fs.root(modr, "go.work")
+ else
+ _3_ = nil
+ end
+ return (_3_ or modr)
+ end
+ return cb(_2_())
+end
+return {cmd = {"gopls"}, filetypes = {"go", "gomod", "gowork", "gosum"}, root_dir = _1_, settings = {autoformat = true, gopls = {analyses = {unusedparams = true, unusedwrite = true, nilness = true}, gofumpt = true, semanticTokens = true, staticcheck = true}}}