Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-core/src/diagnostic.rs')
| -rw-r--r-- | helix-core/src/diagnostic.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/helix-core/src/diagnostic.rs b/helix-core/src/diagnostic.rs index b9360b52..083dbb0a 100644 --- a/helix-core/src/diagnostic.rs +++ b/helix-core/src/diagnostic.rs @@ -20,6 +20,17 @@ impl Default for Severity { } } +impl Severity { + pub const fn indicator(&self) -> &'static str { + match self { + Self::Hint => "○", + Self::Info => "●", + Self::Warning => "▲", + Self::Error => "■", + } + } +} + #[derive(Debug, Eq, Hash, PartialEq, Clone, Deserialize, Serialize)] pub enum NumberOrString { Number(i32), |