From f6f49735e8070789a970cfd534695a5f2be33624 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Fri, 24 Jul 2020 17:39:16 +0200 Subject: Add toggle for experimental diagnostics --- crates/rust-analyzer/src/config.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates') diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index 8947ccf07..e11c8b909 100644 --- a/crates/rust-analyzer/src/config.rs +++ b/crates/rust-analyzer/src/config.rs @@ -23,6 +23,7 @@ pub struct Config { pub client_caps: ClientCapsConfig, pub publish_diagnostics: bool, + pub experimental_diagnostics: bool, pub diagnostics: DiagnosticsConfig, pub lru_capacity: Option, pub proc_macro_srv: Option<(PathBuf, Vec)>, @@ -137,6 +138,7 @@ impl Config { with_sysroot: true, publish_diagnostics: true, + experimental_diagnostics: true, diagnostics: DiagnosticsConfig::default(), lru_capacity: None, proc_macro_srv: None, @@ -187,6 +189,7 @@ impl Config { self.with_sysroot = data.withSysroot; self.publish_diagnostics = data.diagnostics_enable; + self.experimental_diagnostics = data.diagnostics_enableExperimental; self.diagnostics = DiagnosticsConfig { warnings_as_info: data.diagnostics_warningsAsInfo, warnings_as_hint: data.diagnostics_warningsAsHint, @@ -405,6 +408,7 @@ config_data! { completion_postfix_enable: bool = true, diagnostics_enable: bool = true, + diagnostics_enableExperimental: bool = true, diagnostics_warningsAsHint: Vec = Vec::new(), diagnostics_warningsAsInfo: Vec = Vec::new(), -- cgit v1.2.3