Tell Rust Analyzer to run build to its own target folder
This commit is contained in:
parent
c8dd5d1b2d
commit
1437ec8903
2 changed files with 29 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,4 +1,5 @@
|
|||
**/target
|
||||
**/target_ra
|
||||
/.*.json
|
||||
/.vscode
|
||||
/media/*
|
||||
|
|
29
.vscode/settings.json
vendored
29
.vscode/settings.json
vendored
|
@ -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"
|
||||
],
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue