Add config for proc_macro

This commit is contained in:
Edwin Cheng
2020-04-13 00:05:33 +08:00
parent 22e33f308a
commit a4b0ce07f8
5 changed files with 22 additions and 1 deletions

View File

@@ -131,6 +131,14 @@ impl Config {
set(value, "/cargo/allFeatures", &mut self.cargo.all_features);
set(value, "/cargo/features", &mut self.cargo.features);
set(value, "/cargo/loadOutDirsFromCheck", &mut self.cargo.load_out_dirs_from_check);
match get::<bool>(value, "/procMacro/enabled") {
Some(true) => {
set(value, "/procMacro/serverPath", &mut self.proc_macro_srv);
}
_ => self.proc_macro_srv = None,
}
match get::<Vec<String>>(value, "/rustfmt/overrideCommand") {
Some(mut args) if !args.is_empty() => {
let command = args.remove(0);