mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-12 21:28:51 +00:00
Added the rust-analyzer.checkOnSave.features option.
This commit is contained in:
parent
684b6fa1b8
commit
47ef544fa5
2 changed files with 12 additions and 1 deletions
|
@ -242,7 +242,10 @@ impl Config {
|
||||||
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);
|
set(value, "/checkOnSave/allFeatures", all_features);
|
||||||
*features = self.cargo.features.clone();
|
set(value, "/checkOnSave/features", features);
|
||||||
|
if features.is_empty() && !self.cargo.features.is_empty() {
|
||||||
|
*features = self.cargo.features.clone();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -322,6 +322,14 @@
|
||||||
"default": false,
|
"default": false,
|
||||||
"markdownDescription": "Check with all features (will be passed as `--all-features`)"
|
"markdownDescription": "Check with all features (will be passed as `--all-features`)"
|
||||||
},
|
},
|
||||||
|
"rust-analyzer.checkOnSave.features": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"default": [],
|
||||||
|
"description": "List of features to activate. Set to `rust-analyzer.cargo.features` if empty."
|
||||||
|
},
|
||||||
"rust-analyzer.inlayHints.enable": {
|
"rust-analyzer.inlayHints.enable": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true,
|
"default": true,
|
||||||
|
|
Loading…
Reference in a new issue