diff options
author | Igor Aleksanov <[email protected]> | 2020-08-18 11:35:36 +0100 |
---|---|---|
committer | Igor Aleksanov <[email protected]> | 2020-08-18 11:35:36 +0100 |
commit | 34847c8d96ddf98c40117ebacaecec38b9b758fc (patch) | |
tree | 7b869365309052f2cbfab2df4fa1eb9ee68c5031 /crates | |
parent | b56cfcca10994ec2bf1878f222afdb375459f8d3 (diff) |
Move analysis config structure to the config.rs
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ide/src/lib.rs | 6 | ||||
-rw-r--r-- | crates/rust-analyzer/src/config.rs | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/crates/ide/src/lib.rs b/crates/ide/src/lib.rs index a19a379c6..4b797f374 100644 --- a/crates/ide/src/lib.rs +++ b/crates/ide/src/lib.rs | |||
@@ -99,12 +99,6 @@ pub use text_edit::{Indel, TextEdit}; | |||
99 | 99 | ||
100 | pub type Cancelable<T> = Result<T, Canceled>; | 100 | pub type Cancelable<T> = Result<T, Canceled>; |
101 | 101 | ||
102 | /// Configuration parameters for the analysis run. | ||
103 | #[derive(Debug, Default, Clone)] | ||
104 | pub struct AnalysisConfig { | ||
105 | pub disabled_diagnostics: HashSet<String>, | ||
106 | } | ||
107 | |||
108 | #[derive(Debug)] | 102 | #[derive(Debug)] |
109 | pub struct Diagnostic { | 103 | pub struct Diagnostic { |
110 | pub name: Option<String>, | 104 | pub name: Option<String>, |
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index 4e3ab05b2..44fd7c286 100644 --- a/crates/rust-analyzer/src/config.rs +++ b/crates/rust-analyzer/src/config.rs | |||
@@ -10,7 +10,7 @@ | |||
10 | use std::{collections::HashSet, ffi::OsString, path::PathBuf}; | 10 | use std::{collections::HashSet, ffi::OsString, path::PathBuf}; |
11 | 11 | ||
12 | use flycheck::FlycheckConfig; | 12 | use flycheck::FlycheckConfig; |
13 | use ide::{AnalysisConfig, AssistConfig, CompletionConfig, HoverConfig, InlayHintsConfig}; | 13 | use ide::{AssistConfig, CompletionConfig, HoverConfig, InlayHintsConfig}; |
14 | use lsp_types::ClientCapabilities; | 14 | use lsp_types::ClientCapabilities; |
15 | use project_model::{CargoConfig, ProjectJson, ProjectJsonData, ProjectManifest}; | 15 | use project_model::{CargoConfig, ProjectJson, ProjectJsonData, ProjectManifest}; |
16 | use serde::Deserialize; | 16 | use serde::Deserialize; |
@@ -49,6 +49,12 @@ pub struct Config { | |||
49 | pub analysis: AnalysisConfig, | 49 | pub analysis: AnalysisConfig, |
50 | } | 50 | } |
51 | 51 | ||
52 | /// Configuration parameters for the analysis run. | ||
53 | #[derive(Debug, Default, Clone)] | ||
54 | pub struct AnalysisConfig { | ||
55 | pub disabled_diagnostics: HashSet<String>, | ||
56 | } | ||
57 | |||
52 | #[derive(Debug, Clone, Eq, PartialEq)] | 58 | #[derive(Debug, Clone, Eq, PartialEq)] |
53 | pub enum LinkedProject { | 59 | pub enum LinkedProject { |
54 | ProjectManifest(ProjectManifest), | 60 | ProjectManifest(ProjectManifest), |