How to turn on all or specified features of a crate during development

I have a foundation library that used in many projects, and this library has many features, all turned off by default and may be used differently in different projects. But during development (including cargo check, cargo test, cargo clippy CLI and rust-analyzer in VSCode) I want to turn on all features to check and use intellisense for all of them. By default, since all features are turned off, the cargo commands (unless --all-features is added manually) and rust-analyzer don't check anything.
There are also cases when I need to switch between features for supporting different environments during development to see if the code behaves as expected.
How could I do this?

Sounds like you need to config RA User Manual

rust-analyzer.cargo.features (default: [])
List of features to activate.

Set this to "all" to pass --all-features to cargo.

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.