Information
VIM version
VIM - Vi IMproved 9.2 (2026 Feb 14, compiled Apr 07 2026 19:00:59)
Included patches: 1-316
Operating System: Linux x1 6.19.11-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 02 Apr 2026 23:33:01 +0000 x86_64 GNU/Linux
What went wrong
Rust analyzer's ale_linters#rust#analyzer#GetProjectRoot find the project root by finding the nearest Cargo.toml files. When working with a cargo workspace, there are multiple Cargo.toml files. Current code starts a different instance of rust-analyzer for each crate in the workspace- but rust-anaylzer is aware of cargo workspaces, and can be started at the workspace root and shared among all crates in it, which improves cache utilization and reduces memory consumption, since dependencies of multiple crates in the workspace are analyzer once instead of per crate (this includes the workspace crates themselves which usually depend on each other).
Reproducing the bug
- Create a cargo workspace with multiple crates
- edit rust files under each of those crates
- multiple instances of rust-analyzer will be running
I've attached a patch which fixes the bug- however the patch uses system, which at least on my machine causes ghost characters to sometimes appear (I assume due to some sort of bad behavior of running system in the background while the user is typing, though honestly I'm not sure).
analyzer.patch
Information
VIM version
VIM - Vi IMproved 9.2 (2026 Feb 14, compiled Apr 07 2026 19:00:59)
Included patches: 1-316
Operating System: Linux x1 6.19.11-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 02 Apr 2026 23:33:01 +0000 x86_64 GNU/Linux
What went wrong
Rust analyzer's
ale_linters#rust#analyzer#GetProjectRootfind the project root by finding the nearestCargo.tomlfiles. When working with a cargo workspace, there are multipleCargo.tomlfiles. Current code starts a different instance of rust-analyzer for each crate in the workspace- but rust-anaylzer is aware of cargo workspaces, and can be started at the workspace root and shared among all crates in it, which improves cache utilization and reduces memory consumption, since dependencies of multiple crates in the workspace are analyzer once instead of per crate (this includes the workspace crates themselves which usually depend on each other).Reproducing the bug
I've attached a patch which fixes the bug- however the patch uses
system, which at least on my machine causes ghost characters to sometimes appear (I assume due to some sort of bad behavior of runningsystemin the background while the user is typing, though honestly I'm not sure).analyzer.patch