rules_go
rules_go copied to clipboard
Helix GOPLS Configuration Out of Date
What version of rules_go are you using?
N/A
What version of gazelle are you using?
N/A
What version of Bazel are you using?
N/A
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
MacOS M1 / armv7
Any other potentially useful information about your toolchain?
N.A
What did you do?
I followed the directions in the Wiki for configuring Bazel IDE in helix via GOPLS: https://github.com/bazelbuild/rules_go/wiki/Editor-setup#helix-editor
What did you expect to see?
The helix editor to start normally and LSP features working
What did you see instead?
Failed to parse language config: unknown field `config`, expected one of `name`, `language-id`, `scope`, `file-types`, `shebangs`, `roots`, `comment-token`, `comment-tokens`, `block-comment-tokens`, `text-width`, `soft-wrap`, `auto-format`, `formatter`, `diagnostic-severity`, `grammar`, `injection-regex`, `language-servers`, `indent`, `debugger`, `auto-pairs`, `rulers`, `workspace-lsp-roots`, `persistent-diagnostic-sources`
in `language`
Press <ENTER> to continue with default language config
Updated COnfig that works for me
version - helix 24.3 (2cadec0b)
[language-server.gopls]
command = "gopls"
environment = { "GOPACKAGESDRIVER" = "./tools/bazel/gopackagesdriver.sh" }
[[language]]
name = "go"
file-types = ["go"]
language-servers = ["gopls"]
Were you able to add the extra args included in the current wiki page, e.g., gofumpt
, staticcheck
, usePlaceholders
, etc.? If so, you could edit the wiki page with this solution and close this issue.
I wasn't able to add the additional args but I can try to figure it out and post in this issue.
As far as I know, I don't have edit rights for the wiki.
I think perhaps the script referenced is meant to set whatever arguments are needed by gopls