summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lsp/gopls.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lsp/gopls.lua')
-rw-r--r--.config/nvim/lsp/gopls.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/.config/nvim/lsp/gopls.lua b/.config/nvim/lsp/gopls.lua
new file mode 100644
index 0000000..e3d00bc
--- /dev/null
+++ b/.config/nvim/lsp/gopls.lua
@@ -0,0 +1,21 @@
+return {
+ cmd = { 'gopls' },
+ filetypes = { 'go', 'gomod', 'gowork', 'gotmpl' },
+ root_markers = {
+ 'go.work',
+ 'go.mod',
+ },
+ settings = {
+ gopls = {
+ hints = {
+ rangeVariableTypes = true,
+ parameterNames = true,
+ constantValues = true,
+ assignVariableTypes = true,
+ compositeLiteralFields = true,
+ compositeLiteralTypes = true,
+ functionTypeParameters = true,
+ },
+ },
+ }
+}