From 9dcfe25e4a1868a4936194faf1d753d91d85430a Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Thu, 11 Mar 2021 16:31:49 +0900 Subject: Use diagnostic.severity to distinguish between error colors. --- helix-core/src/diagnostic.rs | 8 ++++++++ helix-core/src/lib.rs | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'helix-core/src') diff --git a/helix-core/src/diagnostic.rs b/helix-core/src/diagnostic.rs index 96ed6746..c1a3b4c1 100644 --- a/helix-core/src/diagnostic.rs +++ b/helix-core/src/diagnostic.rs @@ -1,7 +1,15 @@ use crate::Range; +pub enum Severity { + Error, + Warning, + Info, + Hint, +} + pub struct Diagnostic { pub range: (usize, usize), pub line: usize, pub message: String, + pub severity: Option, } diff --git a/helix-core/src/lib.rs b/helix-core/src/lib.rs index 89b82c4e..81a35f10 100644 --- a/helix-core/src/lib.rs +++ b/helix-core/src/lib.rs @@ -1,6 +1,6 @@ #![allow(unused)] pub mod comment; -mod diagnostic; +pub mod diagnostic; pub mod graphemes; mod history; pub mod indent; -- cgit v1.2.3-70-g09d2