Tell Rust Analyzer to run build to its own target folder

This commit is contained in:
Emil Ernerfeldt 2022-12-12 10:37:31 +01:00
parent c8dd5d1b2d
commit 1437ec8903
2 changed files with 29 additions and 1 deletions

1
.gitignore vendored
View file

@ -1,4 +1,5 @@
**/target
**/target_ra
/.*.json
/.vscode
/media/*

29
.vscode/settings.json vendored
View file

@ -1,5 +1,32 @@
{
"files.insertFinalNewline": true,
"editor.formatOnSave": true,
"files.trimTrailingWhitespace": true
"files.trimTrailingWhitespace": true,
"editor.semanticTokenColorCustomizations": {
"rules": {
"*.unsafe:rust": "#eb5046"
}
},
"files.exclude": {
"target/**": true,
"target_ra/**": 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.checkOnSave.overrideCommand": [
"cargo",
"cranky",
"--target-dir=target_ra",
"--workspace",
"--message-format=json",
"--all-targets"
],
"rust-analyzer.cargo.buildScripts.overrideCommand": [
"cargo",
"check",
"--quiet",
"--target-dir=target_ra",
"--workspace",
"--message-format=json",
"--all-targets"
],
}