"duplicated RLS configuration" each time RLS is started inside VSCode
I've been through the same problem. I am not exactly sure of the proper solution but these workarounds have solved my problem.
- Remove all VSCode extensions that are Rust-related.
- Remove any Rust-related configuration in VSCode settings.json.
- If you are using Linux and you have done a lot of playing around, sometimes
$HOME/.cargo/registry
may be corrupt, so remove that folder if it helps. - Restart VSCode.
Install these extensions in order:
Rust RLS official extension
Do not install Rust kalitaalexey (Seems to be the conflicting cause).
Rust Assist extension.
vscode-rust-syntax extension.
vsc-rustfmt extension.
Cargo extension.
Better TOML
The combination of these extensions work OK for me. Specifically, the syntax formatting works with Ctrl+Shift+I and saving the file automatically does that.
One last hint: Opening 2 Rust project folders in VSCode at the same time may cause an error message that states Unable to find root directory
. Try to avoid that.