mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Move analysis config structure to the config.rs
This commit is contained in:
parent
b56cfcca10
commit
34847c8d96
2 changed files with 7 additions and 7 deletions
|
@ -99,12 +99,6 @@ pub use text_edit::{Indel, TextEdit};
|
||||||
|
|
||||||
pub type Cancelable<T> = Result<T, Canceled>;
|
pub type Cancelable<T> = Result<T, Canceled>;
|
||||||
|
|
||||||
/// Configuration parameters for the analysis run.
|
|
||||||
#[derive(Debug, Default, Clone)]
|
|
||||||
pub struct AnalysisConfig {
|
|
||||||
pub disabled_diagnostics: HashSet<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Diagnostic {
|
pub struct Diagnostic {
|
||||||
pub name: Option<String>,
|
pub name: Option<String>,
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
use std::{collections::HashSet, ffi::OsString, path::PathBuf};
|
use std::{collections::HashSet, ffi::OsString, path::PathBuf};
|
||||||
|
|
||||||
use flycheck::FlycheckConfig;
|
use flycheck::FlycheckConfig;
|
||||||
use ide::{AnalysisConfig, AssistConfig, CompletionConfig, HoverConfig, InlayHintsConfig};
|
use ide::{AssistConfig, CompletionConfig, HoverConfig, InlayHintsConfig};
|
||||||
use lsp_types::ClientCapabilities;
|
use lsp_types::ClientCapabilities;
|
||||||
use project_model::{CargoConfig, ProjectJson, ProjectJsonData, ProjectManifest};
|
use project_model::{CargoConfig, ProjectJson, ProjectJsonData, ProjectManifest};
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
|
@ -49,6 +49,12 @@ pub struct Config {
|
||||||
pub analysis: AnalysisConfig,
|
pub analysis: AnalysisConfig,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Configuration parameters for the analysis run.
|
||||||
|
#[derive(Debug, Default, Clone)]
|
||||||
|
pub struct AnalysisConfig {
|
||||||
|
pub disabled_diagnostics: HashSet<String>,
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Eq, PartialEq)]
|
#[derive(Debug, Clone, Eq, PartialEq)]
|
||||||
pub enum LinkedProject {
|
pub enum LinkedProject {
|
||||||
ProjectManifest(ProjectManifest),
|
ProjectManifest(ProjectManifest),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue