mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 04:53:34 +00:00
Most of the checkOnSafe options now default to the cargo equivalent.
This commit is contained in:
parent
47ef544fa5
commit
33b9058838
2 changed files with 12 additions and 5 deletions
|
@ -241,7 +241,11 @@ impl Config {
|
||||||
set(value, "/checkOnSave/extraArgs", extra_args);
|
set(value, "/checkOnSave/extraArgs", extra_args);
|
||||||
set(value, "/checkOnSave/command", command);
|
set(value, "/checkOnSave/command", command);
|
||||||
set(value, "/checkOnSave/allTargets", all_targets);
|
set(value, "/checkOnSave/allTargets", all_targets);
|
||||||
set(value, "/checkOnSave/allFeatures", all_features);
|
if let Some(new_all_features) = get(value, "/checkOnSave/allFeatures") {
|
||||||
|
*all_features = new_all_features;
|
||||||
|
} else {
|
||||||
|
*all_features = self.cargo.all_features;
|
||||||
|
}
|
||||||
set(value, "/checkOnSave/features", features);
|
set(value, "/checkOnSave/features", features);
|
||||||
if features.is_empty() && !self.cargo.features.is_empty() {
|
if features.is_empty() && !self.cargo.features.is_empty() {
|
||||||
*features = self.cargo.features.clone();
|
*features = self.cargo.features.clone();
|
||||||
|
|
|
@ -318,9 +318,12 @@
|
||||||
"markdownDescription": "Check all targets and tests (will be passed as `--all-targets`)"
|
"markdownDescription": "Check all targets and tests (will be passed as `--all-targets`)"
|
||||||
},
|
},
|
||||||
"rust-analyzer.checkOnSave.allFeatures": {
|
"rust-analyzer.checkOnSave.allFeatures": {
|
||||||
"type": "boolean",
|
"type": [
|
||||||
"default": false,
|
"null",
|
||||||
"markdownDescription": "Check with all features (will be passed as `--all-features`)"
|
"boolean"
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"markdownDescription": "Check with all features (will be passed as `--all-features`). Defaults to `rust-analyzer.cargo.allFeatures`."
|
||||||
},
|
},
|
||||||
"rust-analyzer.checkOnSave.features": {
|
"rust-analyzer.checkOnSave.features": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
@ -328,7 +331,7 @@
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"default": [],
|
"default": [],
|
||||||
"description": "List of features to activate. Set to `rust-analyzer.cargo.features` if empty."
|
"description": "List of features to activate. Defaults to `rust-analyzer.cargo.features`."
|
||||||
},
|
},
|
||||||
"rust-analyzer.inlayHints.enable": {
|
"rust-analyzer.inlayHints.enable": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
|
|
Loading…
Reference in a new issue