miro
July 31, 2026, 2:53pm
1
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: ✓
miro
July 31, 2026, 2:54pm
2
cargo clippy works as expected
kpreid
July 31, 2026, 4:07pm
3
Does rust-analyzer give you diagnostics that are identified as from rustc (not from rust-analyzer) in the error “code”?
miro
July 31, 2026, 4:54pm
4
rustc diagnostics show up without issue
chrefr
August 1, 2026, 11:17pm
5
I've not heard of any rust-analyzer bug wrt. this recently. Are your sure Helix passes your config to rust-analyzer?
miro
August 2, 2026, 12:58pm
7
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.
chrefr
August 2, 2026, 6:29pm
8
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.