summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngus Dippenaar2023-10-29 16:53:15 +0000
committerGitHub2023-10-29 16:53:15 +0000
commit44e03fa41446f46c7be60a62acf6aa4131a62a4a (patch)
tree6dde46ead918f066bd3a9e7a1800f7ac6cbe2c7a
parentef0c31db02cc1ade81b6d5097f1d05d7b3fa85e5 (diff)
add golangci-lint-langserver (#8656)
* languages add golangci-lint-langserver * update docs
-rw-r--r--book/src/generated/lang-support.md2
-rw-r--r--languages.toml8
2 files changed, 8 insertions, 2 deletions
diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md
index 48d805bc..c879a967 100644
--- a/book/src/generated/lang-support.md
+++ b/book/src/generated/lang-support.md
@@ -54,7 +54,7 @@
| git-rebase | ✓ | | | |
| gleam | ✓ | ✓ | | `gleam` |
| glsl | ✓ | ✓ | ✓ | |
-| go | ✓ | ✓ | ✓ | `gopls` |
+| go | ✓ | ✓ | ✓ | `gopls`, `golangci-lint-langserver` |
| godot-resource | ✓ | | | |
| gomod | ✓ | | | `gopls` |
| gotmpl | ✓ | | | `gopls` |
diff --git a/languages.toml b/languages.toml
index 8b9b01e9..24e20654 100644
--- a/languages.toml
+++ b/languages.toml
@@ -117,6 +117,12 @@ functionTypeParameters = true
parameterNames = true
rangeVariableTypes = true
+[language-server.golangci-lint-lsp]
+command = "golangci-lint-langserver"
+
+[language-server.golangci-lint-lsp.config]
+command = ["golangci-lint", "run", "--out-format", "json", "--issues-exit-code=1"]
+
[language-server.rust-analyzer]
command = "rust-analyzer"
@@ -495,7 +501,7 @@ file-types = ["go"]
roots = ["go.work", "go.mod"]
auto-format = true
comment-token = "//"
-language-servers = [ "gopls" ]
+language-servers = [ "gopls", "golangci-lint-lsp" ]
# TODO: gopls needs utf-8 offsets?
indent = { tab-width = 4, unit = "\t" }