aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/diagnostic.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-03-15 07:19:31 +0000
committerBlaž Hrastnik2021-03-15 07:19:31 +0000
commit87e3cd3df283a6da055488bbea60637713bd1f35 (patch)
tree94fc1d72a136d4ccadc927ea19f95cac370eb61c /helix-core/src/diagnostic.rs
parent1abf2953cdee525f8c1f30e881bc5c4211cb62fd (diff)
ui: Render diagnostic errors in sideline.
Diffstat (limited to 'helix-core/src/diagnostic.rs')
-rw-r--r--helix-core/src/diagnostic.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/helix-core/src/diagnostic.rs b/helix-core/src/diagnostic.rs
index c1a3b4c1..5056c26a 100644
--- a/helix-core/src/diagnostic.rs
+++ b/helix-core/src/diagnostic.rs
@@ -1,5 +1,3 @@
-use crate::Range;
-
pub enum Severity {
Error,
Warning,
@@ -7,8 +5,12 @@ pub enum Severity {
Hint,
}
+pub struct Range {
+ pub start: usize,
+ pub end: usize,
+}
pub struct Diagnostic {
- pub range: (usize, usize),
+ pub range: Range,
pub line: usize,
pub message: String,
pub severity: Option<Severity>,