Tweak Rust Analyzer settings (#7617)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
0abeccebc9
commit
82b6b3c98d
|
|
@ -12,32 +12,14 @@
|
||||||
"target_wasm/**": true,
|
"target_wasm/**": true,
|
||||||
"target/**": true,
|
"target/**": true,
|
||||||
},
|
},
|
||||||
// Tell Rust Analyzer to use its own target directory, so we don't need to wait for it to finish wen we want to `cargo run`
|
"rust-analyzer.check.command": "clippy",
|
||||||
"rust-analyzer.check.overrideCommand": [
|
// Whether `--workspace` should be passed to `cargo clippy`. If false, `-p <package>` will be passed instead.
|
||||||
"cargo",
|
"rust-analyzer.check.workspace": false,
|
||||||
"clippy",
|
"rust-analyzer.cargo.allTargets": true,
|
||||||
"--target-dir=target_ra",
|
"rust-analyzer.cargo.features": "all",
|
||||||
"--workspace",
|
// Use a separate target directory for Rust Analyzer so it doesn't prevent cargo/clippy from doing things.
|
||||||
"--message-format=json",
|
"rust-analyzer.cargo.targetDir": "target_ra",
|
||||||
"--all-targets",
|
|
||||||
"--all-features",
|
|
||||||
],
|
|
||||||
"rust-analyzer.cargo.buildScripts.overrideCommand": [
|
|
||||||
"cargo",
|
|
||||||
"clippy",
|
|
||||||
"--quiet",
|
|
||||||
"--target-dir=target_ra",
|
|
||||||
"--workspace",
|
|
||||||
"--message-format=json",
|
|
||||||
"--all-targets",
|
|
||||||
"--all-features",
|
|
||||||
],
|
|
||||||
"rust-analyzer.showUnlinkedFileNotification": false,
|
"rust-analyzer.showUnlinkedFileNotification": false,
|
||||||
"rust-analyzer.cargo.extraEnv": {
|
|
||||||
// rust-analyzer is only guaranteed to support the latest stable version of Rust. Use it instead of whatever is
|
|
||||||
// specified in rust-toolchain.
|
|
||||||
"RUSTUP_TOOLCHAIN": "stable"
|
|
||||||
},
|
|
||||||
// Uncomment the following options and restart rust-analyzer to get it to check code behind `cfg(target_arch=wasm32)`.
|
// Uncomment the following options and restart rust-analyzer to get it to check code behind `cfg(target_arch=wasm32)`.
|
||||||
// Don't forget to put it in a comment again before committing.
|
// Don't forget to put it in a comment again before committing.
|
||||||
// "rust-analyzer.cargo.target": "wasm32-unknown-unknown",
|
// "rust-analyzer.cargo.target": "wasm32-unknown-unknown",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue