Can I stop vscode/rust-analyzer from shading out cfgs?

I'm actually not sure if this is a rust-analyzer thing or not (I think so?).

Currently, it fades out everything guarded by a cfg, like this:


As most of my code is in a cfg block, this actually makes it very annoying to read. Is there a way to turn it off?

This should work:

    "rust-analyzer.diagnostics.disabled": [

It does! Thank you very much :slight_smile:

Note that most rust-analyzer features won't work in that inactive code though. It'd be better to activate the feature (with rust-analyzer.cargo.features or rust-analyzer.cargo.allFeatures).

1 Like

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.