Rust SyntaxThis extension provides a TextMate grammar for Rust. In most cases, you won't need to install the extension, as this repository is upstreamed by VS Code (issues and PRs should be submitted here). If you are doing a significant amount of Rust programming, the semantic highlighting provided by Rust Analyzer will be superior to a textmate grammar. For example, semantic highlighting can easily distinguish enums, structs, and traits. Rust Syntax is compatible with Rust Analyzer, but the scopes provided by this extension will not be visible while semantic highlighting is enabled. If for some reason you would like to disable semantic highlighting, you can do this in your
CompatibilityNot all themes are specifically optimized for Rust.
We have tried to provide sensible default scopes that will work with most themes.
If you want to modify the colors in a particular theme, you can do so in your
The VS Code command ContributingThe grammar is maintained as YAML, using tasks to generate JSON on save (please don't edit the JSON grammar directly).
You can regenerate the JSON manually from the command palette using |