Vscode inactive regions settings for user

Currently for inactive code rust-analyzer in vscode dims inactive regions, colors not changed.
No settings exposed to user, can only be disabled by:

"rust-analyzer.diagnostics.disabled": ["inactive-code"]

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.


This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.