Rust-analyzer in helix doesn't seem to give me clippy warnings anymore

i remember having clippy diagnostics in the past, but i don't anymore,
the relevent part of my languages.toml:

[[language]]
name = "rust"
language-servers = [ "rust-analyzer", "hx-lsp" ]

[language-server.rust-analyzer.config]
check.command = "clippy"
rust-analyzer.cargo.autoreload = true

hx --health rust:

Configured language servers:
  ✓ rust-analyzer: /home/[USER]/.cargo/bin/rust-analyzer
  ✓ hx-lsp: /run/current-system/sw/bin/hx-lsp
Configured debug adapter:
  ✘ 'lldb-dap' not found in $PATH
Configured formatter: None
Tree-sitter parser: ✓
Highlight queries: ✓
Textobject queries: ✓
Indent queries: ✓
Tags queries: ✓
Rainbow queries: ✓

cargo clippy works as expected

Does rust-analyzer give you diagnostics that are identified as from rustc (not from rust-analyzer) in the error “code”?

rustc diagnostics show up without issue

I've not heard of any rust-analyzer bug wrt. this recently. Are your sure Helix passes your config to rust-analyzer?

Are your sure Helix passes your config to rust-analyzer?
is there a way to check if my configuration is being send to rust-analyzer?

i found the problem, rust-analyzer prefixes all config options with rust-analyzer, so rust-analyzer needs to be be both before and after config, so the correct config would be


[[language]]
name = "rust"
language-servers = [ "rust-analyzer", "hx-lsp" ]

[language-server.rust-analyzer.config.rust-analyzer]
check.command = "clippy"
cargo.autoreload = true

i feel like rust-analyzer should log a warning if it receives a invalid config option that would be valid if prefixed with rust-analyzer.

It depends on the editor whether you need to add the prefix yourself.

rust-analyzer does error when passed invalid config, but extra fields are not an error due to the way serde works, and we probably don't want them to be to keep forward compatibility. We could warn but that is complicated.