Currently for inactive code rust-analyzer in vscode dims inactive regions, colors not changed.
No settings exposed to user, can only be disabled by:
vscode-cpptools exposes below settings from version 0.18.0, August 17, 2018 :
Please add similar settings.
Rust-analyzer simply emits a weak warning with the unused flag set: rust-analyzer/inactive_code.rs at 38e9a110d4f136c22cb4eed9c3581d7992eade56 · rust-lang/rust-analyzer · GitHub. How that is shown to the user is up to the editor. Rust-analyzer doesn't have control over this. Maybe vscode-cpptools directly uses vscode api's to style the code instead of emitting diagnostics with the unused flag? That doesn't work with other editors and requires code in the vscode extension as opposed to the language server itself.