summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/lsp/go-ls.lua
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-05-31 22:20:30 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-05-31 22:20:30 +0200
commit7d1e8075b8f156f3f8c300326abf730a1a8f2875 (patch)
tree4fff845d6cd1b66e267ef76dfad122a174f2c7a4 /.config/nvim/lua/lsp/go-ls.lua
parent0ce9de258802b9c3259083e6f1ab5739e8e51084 (diff)
Copying of Luke's dots
Diffstat (limited to '.config/nvim/lua/lsp/go-ls.lua')
-rw-r--r--.config/nvim/lua/lsp/go-ls.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/.config/nvim/lua/lsp/go-ls.lua b/.config/nvim/lua/lsp/go-ls.lua
new file mode 100644
index 0000000..1311247
--- /dev/null
+++ b/.config/nvim/lua/lsp/go-ls.lua
@@ -0,0 +1,7 @@
+require'lspconfig'.gopls.setup{
+ cmd = {DATA_PATH .. "/lspinstall/go/gopls"},
+ settings = {gopls = {analyses = {unusedparams = true}, staticcheck = true}},
+ root_dir = require'lspconfig'.util.root_pattern(".git","go.mod","."),
+ init_options = {usePlaceholders = true, completeUnimported = true},
+ on_attach = require'lsp'.common_on_attach
+}