aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/rust-analyzer/src/config.rs5
-rw-r--r--editors/code/package.json8
2 files changed, 12 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs
index 5d5f7d66a..320414ecf 100644
--- a/crates/rust-analyzer/src/config.rs
+++ b/crates/rust-analyzer/src/config.rs
@@ -242,7 +242,10 @@ impl Config {
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 set(value, "/checkOnSave/allFeatures", all_features);
245 *features = self.cargo.features.clone(); 245 set(value, "/checkOnSave/features", features);
246 if features.is_empty() && !self.cargo.features.is_empty() {
247 *features = self.cargo.features.clone();
248 }
246 } 249 }
247 } 250 }
248 }; 251 };
diff --git a/editors/code/package.json b/editors/code/package.json
index 779d7e1b8..6389499e9 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -322,6 +322,14 @@
322 "default": false, 322 "default": false,
323 "markdownDescription": "Check with all features (will be passed as `--all-features`)" 323 "markdownDescription": "Check with all features (will be passed as `--all-features`)"
324 }, 324 },
325 "rust-analyzer.checkOnSave.features": {
326 "type": "array",
327 "items": {
328 "type": "string"
329 },
330 "default": [],
331 "description": "List of features to activate. Set to `rust-analyzer.cargo.features` if empty."
332 },
325 "rust-analyzer.inlayHints.enable": { 333 "rust-analyzer.inlayHints.enable": {
326 "type": "boolean", 334 "type": "boolean",
327 "default": true, 335 "default": true,