summaryrefslogtreecommitdiff
path: root/support/texlab/src/diagnostics/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'support/texlab/src/diagnostics/mod.rs')
-rw-r--r--support/texlab/src/diagnostics/mod.rs28
1 files changed, 14 insertions, 14 deletions
diff --git a/support/texlab/src/diagnostics/mod.rs b/support/texlab/src/diagnostics/mod.rs
index c738395028..906da9858f 100644
--- a/support/texlab/src/diagnostics/mod.rs
+++ b/support/texlab/src/diagnostics/mod.rs
@@ -2,27 +2,27 @@ mod bibtex;
mod build;
mod latex;
-use self::bibtex::BibtexDiagnosticsProvider;
-pub use self::bibtex::BibtexErrorCode;
-use self::build::BuildDiagnosticsProvider;
-use self::latex::LatexDiagnosticsProvider;
-pub use self::latex::LatexLintOptions;
-use crate::workspace::Document;
-use lsp_types::Diagnostic;
+pub use self::{
+ bibtex::{BibtexDiagnosticsProvider, BibtexError, BibtexErrorCode},
+ build::BuildDiagnosticsProvider,
+ latex::LatexDiagnosticsProvider,
+};
-#[derive(Debug, PartialEq, Eq, Clone, Default)]
+use crate::{protocol::Diagnostic, workspace::Document};
+
+#[derive(Debug, Default)]
pub struct DiagnosticsManager {
- pub build: BuildDiagnosticsProvider,
- pub latex: LatexDiagnosticsProvider,
pub bibtex: BibtexDiagnosticsProvider,
+ pub latex: LatexDiagnosticsProvider,
+ pub build: BuildDiagnosticsProvider,
}
impl DiagnosticsManager {
- pub fn get(&self, document: &Document) -> Vec<Diagnostic> {
+ pub async fn get(&self, doc: &Document) -> Vec<Diagnostic> {
let mut diagnostics = Vec::new();
- diagnostics.append(&mut self.build.get(document));
- diagnostics.append(&mut self.latex.get(document));
- diagnostics.append(&mut self.bibtex.get(document));
+ diagnostics.append(&mut self.bibtex.get(doc));
+ diagnostics.append(&mut self.latex.get(doc));
+ diagnostics.append(&mut self.build.get(doc).await);
diagnostics
}
}