diff options
-rw-r--r-- | crates/rust-analyzer/src/config.rs | 4 | ||||
-rw-r--r-- | editors/code/package.json | 15 |
2 files changed, 14 insertions, 5 deletions
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 { | |||
23 | pub client_caps: ClientCapsConfig, | 23 | pub client_caps: ClientCapsConfig, |
24 | 24 | ||
25 | pub publish_diagnostics: bool, | 25 | pub publish_diagnostics: bool, |
26 | pub experimental_diagnostics: bool, | ||
26 | pub diagnostics: DiagnosticsConfig, | 27 | pub diagnostics: DiagnosticsConfig, |
27 | pub lru_capacity: Option<usize>, | 28 | pub lru_capacity: Option<usize>, |
28 | pub proc_macro_srv: Option<(PathBuf, Vec<OsString>)>, | 29 | pub proc_macro_srv: Option<(PathBuf, Vec<OsString>)>, |
@@ -137,6 +138,7 @@ impl Config { | |||
137 | 138 | ||
138 | with_sysroot: true, | 139 | with_sysroot: true, |
139 | publish_diagnostics: true, | 140 | publish_diagnostics: true, |
141 | experimental_diagnostics: true, | ||
140 | diagnostics: DiagnosticsConfig::default(), | 142 | diagnostics: DiagnosticsConfig::default(), |
141 | lru_capacity: None, | 143 | lru_capacity: None, |
142 | proc_macro_srv: None, | 144 | proc_macro_srv: None, |
@@ -187,6 +189,7 @@ impl Config { | |||
187 | 189 | ||
188 | self.with_sysroot = data.withSysroot; | 190 | self.with_sysroot = data.withSysroot; |
189 | self.publish_diagnostics = data.diagnostics_enable; | 191 | self.publish_diagnostics = data.diagnostics_enable; |
192 | self.experimental_diagnostics = data.diagnostics_enableExperimental; | ||
190 | self.diagnostics = DiagnosticsConfig { | 193 | self.diagnostics = DiagnosticsConfig { |
191 | warnings_as_info: data.diagnostics_warningsAsInfo, | 194 | warnings_as_info: data.diagnostics_warningsAsInfo, |
192 | warnings_as_hint: data.diagnostics_warningsAsHint, | 195 | warnings_as_hint: data.diagnostics_warningsAsHint, |
@@ -405,6 +408,7 @@ config_data! { | |||
405 | completion_postfix_enable: bool = true, | 408 | completion_postfix_enable: bool = true, |
406 | 409 | ||
407 | diagnostics_enable: bool = true, | 410 | diagnostics_enable: bool = true, |
411 | diagnostics_enableExperimental: bool = true, | ||
408 | diagnostics_warningsAsHint: Vec<String> = Vec::new(), | 412 | diagnostics_warningsAsHint: Vec<String> = Vec::new(), |
409 | diagnostics_warningsAsInfo: Vec<String> = Vec::new(), | 413 | diagnostics_warningsAsInfo: Vec<String> = Vec::new(), |
410 | 414 | ||
diff --git a/editors/code/package.json b/editors/code/package.json index 448e2269f..658c913fd 100644 --- a/editors/code/package.json +++ b/editors/code/package.json | |||
@@ -200,11 +200,6 @@ | |||
200 | "type": "object", | 200 | "type": "object", |
201 | "title": "Rust Analyzer", | 201 | "title": "Rust Analyzer", |
202 | "properties": { | 202 | "properties": { |
203 | "rust-analyzer.diagnostics.enable": { | ||
204 | "type": "boolean", | ||
205 | "default": true, | ||
206 | "markdownDescription": "Whether to show native rust-analyzer diagnostics." | ||
207 | }, | ||
208 | "rust-analyzer.lruCapacity": { | 203 | "rust-analyzer.lruCapacity": { |
209 | "type": [ | 204 | "type": [ |
210 | "null", | 205 | "null", |
@@ -579,6 +574,16 @@ | |||
579 | "type": "boolean", | 574 | "type": "boolean", |
580 | "default": true | 575 | "default": true |
581 | }, | 576 | }, |
577 | "rust-analyzer.diagnostics.enable": { | ||
578 | "type": "boolean", | ||
579 | "default": true, | ||
580 | "markdownDescription": "Whether to show native rust-analyzer diagnostics." | ||
581 | }, | ||
582 | "rust-analyzer.diagnostics.enableExperimental": { | ||
583 | "type": "boolean", | ||
584 | "default": true, | ||
585 | "markdownDescription": "Whether to show experimental rust-analyzer diagnostics that might have more false positives than usual." | ||
586 | }, | ||
582 | "rust-analyzer.diagnostics.warningsAsInfo": { | 587 | "rust-analyzer.diagnostics.warningsAsInfo": { |
583 | "type": "array", | 588 | "type": "array", |
584 | "uniqueItems": true, | 589 | "uniqueItems": true, |