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 {
241241 set ( value, "/checkOnSave/extraArgs" , extra_args) ;
242242 set ( value, "/checkOnSave/command" , command) ;
243243 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+ }
245249 set ( value, "/checkOnSave/features" , features) ;
246250 if features. is_empty ( ) && !self . cargo . features . is_empty ( ) {
247251 * features = self . cargo . features . clone ( ) ;
Original file line number Diff line number Diff line change 318318 "markdownDescription" : " Check all targets and tests (will be passed as `--all-targets`)"
319319 },
320320 "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`."
324327 },
325328 "rust-analyzer.checkOnSave.features" : {
326329 "type" : " array" ,
327330 "items" : {
328331 "type" : " string"
329332 },
330333 "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`."
332335 },
333336 "rust-analyzer.inlayHints.enable" : {
334337 "type" : " boolean" ,
You can’t perform that action at this time.
0 commit comments