File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -241,7 +241,11 @@ impl Config {
241
241
set ( value, "/checkOnSave/extraArgs" , extra_args) ;
242
242
set ( value, "/checkOnSave/command" , command) ;
243
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
249
set ( value, "/checkOnSave/features" , features) ;
246
250
if features. is_empty ( ) && !self . cargo . features . is_empty ( ) {
247
251
* features = self . cargo . features . clone ( ) ;
Original file line number Diff line number Diff line change 318
318
"markdownDescription" : " Check all targets and tests (will be passed as `--all-targets`)"
319
319
},
320
320
"rust-analyzer.checkOnSave.allFeatures" : {
321
- "type" : " boolean" ,
322
- "default" : false ,
323
- "markdownDescription" : " Check with all features (will be passed as `--all-features`)"
321
+ "type" : [
322
+ " null" ,
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
328
"rust-analyzer.checkOnSave.features" : {
326
329
"type" : " array" ,
327
330
"items" : {
328
331
"type" : " string"
329
332
},
330
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
336
"rust-analyzer.inlayHints.enable" : {
334
337
"type" : " boolean" ,
You can’t perform that action at this time.
0 commit comments