How to use Clippy in VS Code with rust-analyzer?

Switch the 'Check Command' setting from check to clippy:

image

Or, if you prefer editing your settings.json by hand:

"rust-analyzer.check.command": "clippy"

This should give you Clippy errors/warnings inline like you'd expect (please don't judge my code :sweat_smile:) :

EDIT: The naming of this changed in a recent version of Rust Analyzer, so I've updated the above info!