Simple VSCode diagnostic integration. Provides: code diagnostics, formatting, and snippets.
This extension is for if the RLS is causing you issues. If it is not, I recommend trying out the official Rust VSCode Extension.
Inline Code Diagnostics
This extension automatically provides inline diagnostics for Rust by calling
cargo check and parsing the output. As a result, it avoids using the RLS. This isn't ideal in the long term, but currently the nightly RLS preview has trouble on some projects and crashes frequently.
By default, this runs on save and on startup.
Formatting is supported through the
rustfmt tool. Formatting style can be configured by creating a
rustfmt.toml file in the same directory as your
Cargo.toml file. Possible configuration settings can be found here. More information about the
rustfmt tool can be found here.
By default, formatting is not enabled.
Supports Multiple Rust Projects
It supports multiple rust projects in the same workspace. The extension will search for
Cargo.toml files in the workspace and use them as the root directories to generate diagnostics for.
Basic snippets are provided for Rust.
Make sure you have rustup installed. Instructions for installing rustup can be found here.
If you have already installed
rustfmt via cargo, you will need to delete it from your cargo bin directory. Using
rustfmt through cargo may break when switching toolchains or updating the compiler.
rustfmt by running:
rustup component add rustfmt-preview
This extension contributes the following settings:
||Specifies if diagnostics should be generated on startup.||
||Specifies if diagnostics should be generated on save.||
||Specifies if the file should be formatted on save.||
||The format mode to write in. Backup generates backups, overwrite does not.||
Cargo.toml file is not found, the extension will not provide diagnostic data.
0.2.3 - 2018-11-07
- Display an error when there's an configuration error in