File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -242,7 +242,10 @@ impl Config {
242
242
set ( value, "/checkOnSave/command" , command) ;
243
243
set ( value, "/checkOnSave/allTargets" , all_targets) ;
244
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
} ;
Original file line number Diff line number Diff line change 322
322
"default" : false ,
323
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
333
"rust-analyzer.inlayHints.enable" : {
326
334
"type" : " boolean" ,
327
335
"default" : true ,
You can’t perform that action at this time.
0 commit comments