-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Helix Editor #35
Comments
I copied my config from the following PR on helix repo. I'm also not getting any diagnostic errors. To confirm I disabled language-servers = [ "golangci-lint-lsp" ] Now, when I opened a main.go file from one of my project and executed the following commands then I got these messages. :lsp-workspace-command
No active language servers for this document support workspace commands
:lsp-restart
Language server exited For full reference, here's what my languages.toml file looks like without adding [[language]]
name = "go"
scope = "source.go"
injection-regex = "go"
file-types = ["go"]
roots = ["go.work", "go.mod"]
auto-format = true
comment-token = "//"
language-servers = [ "golangci-lint-lsp" ]
# TODO: gopls needs utf-8 offsets?
indent = { tab-width = 4, unit = "\t" }
[language-server.gopls]
command = "gopls"
[language-server.gopls.config.hints]
assignVariableTypes = true
compositeLiteralFields = true
constantValues = true
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"] |
I also tried using this with
|
Is this still an issue? I have a Relevant excerpt [language-server.golangci-lint-lsp]
command = "golangci-lint-langserver"
[language-server.golangci-lint-lsp.config]
command = [
"golangci-lint",
"run",
"--enable-all",
"--out-format",
"json",
"--issues-exit-code=1",
]
[[language]]
name = "go"
auto-format = false
text-width = 100
rulers = [100]
file-types = ["go"]
language-servers = ["gopls", "golangci-lint-lsp"] |
With a config similar to that, it seems to be working for me. |
golangci-lint-langserver is built into Helix by default now: helix-editor/helix#8656 :) |
Hi,
https://github.com/helix-editor/helix/ is a great editor and recently added support for multiple language servers. This should finally make it possible to use golangci-lint for diagnostics in the editor.
I'm wondering if anybody has been able to get this working. This is what I have in my
languages.toml
so far:All my pre-existing config for gopls works just fine, but I'm not getting any diagnostics from golangci-lint.
Official Helix Docs
The text was updated successfully, but these errors were encountered: