Auto merge of #16924 - poliorcetics:ab/push-kxwqvtypvlsq, r=Veykril

feat: Add `rust-analyzer.cargo.allTargets` to configure passing `--all-targets` to cargo invocations

Closes #16859

## Unresolved question:

Should this be a setting for build scripts only ? All the other `--all-targets` I found where already covered by `checkOnSave.allTargets`
This commit is contained in:
bors 2024-04-01 10:30:15 +00:00
commit 2678660880
5 changed files with 31 additions and 9 deletions

View file

@ -546,6 +546,11 @@
"minimum": 0,
"maximum": 255
},
"rust-analyzer.cargo.allTargets": {
"markdownDescription": "Pass `--all-targets` to cargo invocation. Overridden by `#rust-analyzer.check.allTargets#`\nwhen the latter is set.",
"default": true,
"type": "boolean"
},
"rust-analyzer.cargo.autoreload": {
"markdownDescription": "Automatically refresh project info via `cargo metadata` on\n`Cargo.toml` or `.cargo/config.toml` changes.",
"default": true,
@ -707,9 +712,12 @@
"type": "boolean"
},
"rust-analyzer.check.allTargets": {
"markdownDescription": "Check all targets and tests (`--all-targets`).",
"default": true,
"type": "boolean"
"markdownDescription": "Check all targets and tests (`--all-targets`). Overrides `#rust-analyzer.cargo.allTargets#`.",
"default": null,
"type": [
"null",
"boolean"
]
},
"rust-analyzer.check.command": {
"markdownDescription": "Cargo command to use for `cargo check`.",