aboutsummaryrefslogtreecommitdiff
path: root/helix-core
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-03-11 07:31:49 +0000
committerBlaž Hrastnik2021-03-11 07:31:49 +0000
commit9dcfe25e4a1868a4936194faf1d753d91d85430a (patch)
treec74f469e83b848c10545819c0fdc511f26457993 /helix-core
parentc7ccb432ef174e2eeadafe19dfb8b7c978062dc8 (diff)
Use diagnostic.severity to distinguish between error colors.
Diffstat (limited to 'helix-core')
-rw-r--r--helix-core/src/diagnostic.rs8
-rw-r--r--helix-core/src/lib.rs2
2 files changed, 9 insertions, 1 deletions
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<Severity>,
}
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;