on master help sign in
add golangci-lint-langserver (#8656)
44e03faAngus Dippenaar
book/src/generated/lang-support.md+1−1
@@ -54,7 +54,7 @@
54| git-rebase | ✓ | | | |
54| git-rebase | ✓ | | | |
55| gleam | ✓ | ✓ | | `gleam` |
55| gleam | ✓ | ✓ | | `gleam` |
56| glsl | ✓ | ✓ | ✓ | |
56| glsl | ✓ | ✓ | ✓ | |
57−| go | ✓ | ✓ | ✓ | `gopls` |
57+| go | ✓ | ✓ | ✓ | `gopls`, `golangci-lint-langserver` |
58| godot-resource | ✓ | | | |
58| godot-resource | ✓ | | | |
59| gomod | ✓ | | | `gopls` |
59| gomod | ✓ | | | `gopls` |
60| gotmpl | ✓ | | | `gopls` |
60| gotmpl | ✓ | | | `gopls` |
languages.toml+7−1
@@ -117,6 +117,12 @@ functionTypeParameters = true
117parameterNames = true
117parameterNames = true
118rangeVariableTypes = true
118rangeVariableTypes = true
119
119
120+[language-server.golangci-lint-lsp]
121+command = "golangci-lint-langserver"
122+
123+[language-server.golangci-lint-lsp.config]
124+command = ["golangci-lint", "run", "--out-format", "json", "--issues-exit-code=1"]
125+
120
126
121[language-server.rust-analyzer]
127[language-server.rust-analyzer]
122command = "rust-analyzer"
128command = "rust-analyzer"
@@ -495,7 +501,7 @@ file-types = ["go"]
495roots = ["go.work", "go.mod"]
501roots = ["go.work", "go.mod"]
496auto-format = true
502auto-format = true
497comment-token = "//"
503comment-token = "//"
498−language-servers = [ "gopls" ]
504+language-servers = [ "gopls", "golangci-lint-lsp" ]
499# TODO: gopls needs utf-8 offsets?
505# TODO: gopls needs utf-8 offsets?
500indent = { tab-width = 4, unit = "\t" }
506indent = { tab-width = 4, unit = "\t" }
501
507