Replies: 5 comments 12 replies
-
Try passing in something like the following. Check out the example on this page. If it works just make sure you are prefixing it and you should be able to find the prefixes (formatting, ui., etc) on the settings page.
|
Beta Was this translation helpful? Give feedback.
-
here reloading helix config after changing languages.toml triggers an error that says config is not a key and doesnt exists |
Beta Was this translation helpful? Give feedback.
-
try the following in your languages file [[language]]
name = "go"
roots = ["go.work", "go.mod"]
auto-format = true
formatter = ["gofmt"]
comment-token = "//"
language-servers = [ "gopls", "golangci-lint-lsp" ]
[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"] and you should get Configured language servers:
✓ gopls: /home/oldmanfroggy/go/bin/gopls
✓ golangci-lint-langserver: /home/oldmanfroggy/go/bin/golangci-lint-langserver
Configured debug adapter: dlv
Binary for debug adapter: /home/oldmanfroggy/go/bin/dlv
Configured formatter: gofmt
Binary for formatter: /usr/local/go/bin/gofmt
Tree-sitter parser: ✓
Highlight queries: ✓
Textobject queries: ✓
Indent queries: ✓ for static check stuff just change formatter to yeah, I was late to the party... but the above should solve issues (or at least does for me on Ubnuntu base, and snap version of helix on the edge ;) ) |
Beta Was this translation helpful? Give feedback.
-
Leaving it here in case someone else is also looking for that. I wanted Helix to add missing import on save and put local imports in a separate group from third-party packages. All I had to do is to add this to my
|
Beta Was this translation helpful? Give feedback.
-
Hey, has someone being able to enable staticcheck in gopls config on helix 25.01.1 (e7ac2fc) ? I have tried every possible variation but still no success :( |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to configure
gopls
similar to how I have it configured in nvim, namely:But despite adding the following to
languages.toml
:it seems that the default behavior of gopls is unchanged. Specifically, what I want to do is:
The latter works out of the box, which is awesome. The former two, however, I personally consider to be baseline functionality. I don't want to use the
%
,:pipe goimports
strategy because (1) LSP can already handle this and (2) it crashes in some scenarios, such as when I'm trying to do it on a project that uses Bazel.Any help would be appreciated, or if there's a better way to do it, that'd be great too!
Happy to provide any other info.
Beta Was this translation helpful? Give feedback.
All reactions