From 34847c8d96ddf98c40117ebacaecec38b9b758fc Mon Sep 17 00:00:00 2001 From: Igor Aleksanov Date: Tue, 18 Aug 2020 13:35:36 +0300 Subject: Move analysis config structure to the config.rs --- crates/ide/src/lib.rs | 6 ------ crates/rust-analyzer/src/config.rs | 8 +++++++- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'crates') 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}; pub type Cancelable = Result; -/// Configuration parameters for the analysis run. -#[derive(Debug, Default, Clone)] -pub struct AnalysisConfig { - pub disabled_diagnostics: HashSet, -} - #[derive(Debug)] pub struct Diagnostic { pub name: Option, 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 @@ use std::{collections::HashSet, ffi::OsString, path::PathBuf}; use flycheck::FlycheckConfig; -use ide::{AnalysisConfig, AssistConfig, CompletionConfig, HoverConfig, InlayHintsConfig}; +use ide::{AssistConfig, CompletionConfig, HoverConfig, InlayHintsConfig}; use lsp_types::ClientCapabilities; use project_model::{CargoConfig, ProjectJson, ProjectJsonData, ProjectManifest}; use serde::Deserialize; @@ -49,6 +49,12 @@ pub struct Config { pub analysis: AnalysisConfig, } +/// Configuration parameters for the analysis run. +#[derive(Debug, Default, Clone)] +pub struct AnalysisConfig { + pub disabled_diagnostics: HashSet, +} + #[derive(Debug, Clone, Eq, PartialEq)] pub enum LinkedProject { ProjectManifest(ProjectManifest), -- cgit v1.2.3