Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Rust Analyzer Support

If your code editor or IDE supports Rust Analyzer, you can configure it to use bevy_lint instead of cargo check. This will let you easily see Bevy-specific warnings and quick fixes in your project, alongside the normal checks like dead_code and unexpected_cfgs.

To do this, you will need to override the rust-analyzer.check.overrideCommand configuration value:

{
    "rust-analyzer.check.overrideCommand": [
        "bevy_lint",
        "--workspace",
        "--all-targets",
        "--message-format=json-diagnostic-rendered-ansi",
    ]
}

Check Rust Analyzer's and your editor's docs to see where to set this configuration. For example, it is .vscode/settings.json for VSCode and languages.toml for Helix.

If your editor does not support colorful diagnostics, you may need to set the message format to --message-format=json instead.