aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/rust-analyzer/src/config.rs6
-rw-r--r--editors/code/package.json11
2 files changed, 12 insertions, 5 deletions
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs
index 320414ecf..617612dc3 100644
--- a/crates/rust-analyzer/src/config.rs
+++ b/crates/rust-analyzer/src/config.rs
@@ -241,7 +241,11 @@ impl Config {
241 set(value, "/checkOnSave/extraArgs", extra_args); 241 set(value, "/checkOnSave/extraArgs", extra_args);
242 set(value, "/checkOnSave/command", command); 242 set(value, "/checkOnSave/command", command);
243 set(value, "/checkOnSave/allTargets", all_targets); 243 set(value, "/checkOnSave/allTargets", all_targets);
244 set(value, "/checkOnSave/allFeatures", all_features); 244 if let Some(new_all_features) = get(value, "/checkOnSave/allFeatures") {
245 *all_features = new_all_features;
246 } else {
247 *all_features = self.cargo.all_features;
248 }
245 set(value, "/checkOnSave/features", features); 249 set(value, "/checkOnSave/features", features);
246 if features.is_empty() && !self.cargo.features.is_empty() { 250 if features.is_empty() && !self.cargo.features.is_empty() {
247 *features = self.cargo.features.clone(); 251 *features = self.cargo.features.clone();
diff --git a/editors/code/package.json b/editors/code/package.json
index 6389499e9..647c83685 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -318,9 +318,12 @@
318 "markdownDescription": "Check all targets and tests (will be passed as `--all-targets`)" 318 "markdownDescription": "Check all targets and tests (will be passed as `--all-targets`)"
319 }, 319 },
320 "rust-analyzer.checkOnSave.allFeatures": { 320 "rust-analyzer.checkOnSave.allFeatures": {
321 "type": "boolean", 321 "type": [
322 "default": false, 322 "null",
323 "markdownDescription": "Check with all features (will be passed as `--all-features`)" 323 "boolean"
324 ],
325 "default": null,
326 "markdownDescription": "Check with all features (will be passed as `--all-features`). Defaults to `rust-analyzer.cargo.allFeatures`."
324 }, 327 },
325 "rust-analyzer.checkOnSave.features": { 328 "rust-analyzer.checkOnSave.features": {
326 "type": "array", 329 "type": "array",
@@ -328,7 +331,7 @@
328 "type": "string" 331 "type": "string"
329 }, 332 },
330 "default": [], 333 "default": [],
331 "description": "List of features to activate. Set to `rust-analyzer.cargo.features` if empty." 334 "description": "List of features to activate. Defaults to `rust-analyzer.cargo.features`."
332 }, 335 },
333 "rust-analyzer.inlayHints.enable": { 336 "rust-analyzer.inlayHints.enable": {
334 "type": "boolean", 337 "type": "boolean",