aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide/src/lib.rs')
-rw-r--r--crates/ide/src/lib.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/crates/ide/src/lib.rs b/crates/ide/src/lib.rs
index eb6389529..4b797f374 100644
--- a/crates/ide/src/lib.rs
+++ b/crates/ide/src/lib.rs
@@ -44,7 +44,7 @@ mod syntax_highlighting;
44mod syntax_tree; 44mod syntax_tree;
45mod typing; 45mod typing;
46 46
47use std::sync::Arc; 47use std::{collections::HashSet, sync::Arc};
48 48
49use base_db::{ 49use base_db::{
50 salsa::{self, ParallelDatabase}, 50 salsa::{self, ParallelDatabase},
@@ -101,6 +101,7 @@ pub type Cancelable<T> = Result<T, Canceled>;
101 101
102#[derive(Debug)] 102#[derive(Debug)]
103pub struct Diagnostic { 103pub struct Diagnostic {
104 pub name: Option<String>,
104 pub message: String, 105 pub message: String,
105 pub range: TextRange, 106 pub range: TextRange,
106 pub severity: Severity, 107 pub severity: Severity,
@@ -147,7 +148,7 @@ pub struct AnalysisHost {
147} 148}
148 149
149impl AnalysisHost { 150impl AnalysisHost {
150 pub fn new(lru_capacity: Option<usize>) -> AnalysisHost { 151 pub fn new(lru_capacity: Option<usize>) -> Self {
151 AnalysisHost { db: RootDatabase::new(lru_capacity) } 152 AnalysisHost { db: RootDatabase::new(lru_capacity) }
152 } 153 }
153 154
@@ -496,8 +497,11 @@ impl Analysis {
496 &self, 497 &self,
497 file_id: FileId, 498 file_id: FileId,
498 enable_experimental: bool, 499 enable_experimental: bool,
500 disabled_diagnostics: Option<HashSet<String>>,
499 ) -> Cancelable<Vec<Diagnostic>> { 501 ) -> Cancelable<Vec<Diagnostic>> {
500 self.with_db(|db| diagnostics::diagnostics(db, file_id, enable_experimental)) 502 self.with_db(|db| {
503 diagnostics::diagnostics(db, file_id, enable_experimental, disabled_diagnostics)
504 })
501 } 505 }
502 506
503 /// Returns the edit required to rename reference at the position to the new 507 /// Returns the edit required to rename reference at the position to the new