Make it opt-in

This commit is contained in:
Jonas Schievink
2021-06-03 16:11:20 +02:00
parent e5a2c6596d
commit 9fdb8f9037
9 changed files with 44 additions and 4 deletions

View File

@@ -126,6 +126,9 @@ config_data! {
/// and a blue icon in the `Problems Panel`.
diagnostics_warningsAsInfo: Vec<String> = "[]",
/// Expand attribute macros.
experimental_procAttrMacros: bool = "false",
/// Controls file watching implementation.
files_watcher: String = "\"client\"",
/// These directories will be ignored by rust-analyzer.
@@ -546,6 +549,9 @@ impl Config {
let path = self.data.procMacro_server.clone().or_else(|| std::env::current_exe().ok())?;
Some((path, vec!["proc-macro".into()]))
}
pub fn expand_proc_attr_macros(&self) -> bool {
self.data.experimental_procAttrMacros
}
pub fn files(&self) -> FilesConfig {
FilesConfig {
watcher: match self.data.files_watcher.as_str() {