File tree Expand file tree Collapse file tree 1 file changed +41
-3
lines changed
Expand file tree Collapse file tree 1 file changed +41
-3
lines changed Original file line number Diff line number Diff line change 5757 } ;
5858
5959 simonswine . neovim = {
60- lspconfig . gopls . cmd = [
61- "${ pkgs . gopls } /bin/gopls"
62- ] ;
60+ lspconfig . gopls = {
61+ cmd = [
62+ "${ pkgs . gopls } /bin/gopls"
63+ ] ;
64+ gopls = {
65+ # general settings
66+ # https://github.com/golang/tools/blob/master/gopls/doc/settings.md
67+ gofumpt = true ;
68+ analyses = {
69+ # analyzers settings
70+ # https://github.com/golang/tools/blob/master/gopls/doc/analyzers.md
71+ fieldalignment = true ;
72+ nilness = true ;
73+ shadow = true ;
74+ unusedparams = true ;
75+ unusedwrite = true ;
76+ useany = true ;
77+ unusedvariable = true ;
78+ } ;
79+ # use linters from staticcheck.io
80+ staticcheck = true ;
81+ # diagnostics reported by the gc_details command
82+ annotations = {
83+ bounds = true ;
84+ escape = true ;
85+ inline = true ;
86+ nil = true ;
87+ } ;
88+ hints = {
89+ # inlayhints settings
90+ # https://github.com/golang/tools/blob/master/gopls/doc/inlayHints.md
91+ assignVariableTypes = true ;
92+ compositeLiteralFields = true ;
93+ compositeLiteralTypes = true ;
94+ constantValues = true ;
95+ functionTypeParameters = true ;
96+ parameterNames = true ;
97+ rangeVariableTypes = true ;
98+ } ;
99+ } ;
100+ } ;
63101 lspconfig . golangci_lint_ls . cmd = [
64102 "${ pkgs . golangci-lint-langserver } /bin/golangci-lint-langserver"
65103 ] ;
You can’t perform that action at this time.
0 commit comments