aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/diagnostic.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2022-02-13 09:31:51 +0000
committerBlaž Hrastnik2022-02-13 09:31:51 +0000
commitbd549d8a20cce98e24c8653a4a86107c786cbaa3 (patch)
tree0780b58d41b6181e69023265cdb54517e2953778 /helix-core/src/diagnostic.rs
parent7ad8eaaef0b292f4be6c66298cea40d2b928e172 (diff)
parent7083b98a388b30e0b61caac9bf6ccc1d79eadf81 (diff)
Merge remote-tracking branch 'origin/master' into debug
Diffstat (limited to 'helix-core/src/diagnostic.rs')
-rw-r--r--helix-core/src/diagnostic.rs15
1 files changed, 11 insertions, 4 deletions
diff --git a/helix-core/src/diagnostic.rs b/helix-core/src/diagnostic.rs
index 4fcf51c9..210ad639 100644
--- a/helix-core/src/diagnostic.rs
+++ b/helix-core/src/diagnostic.rs
@@ -1,12 +1,19 @@
//! LSP diagnostic utility types.
+use serde::{Deserialize, Serialize};
/// Describes the severity level of a [`Diagnostic`].
-#[derive(Debug, Clone, Copy, Eq, PartialEq)]
+#[derive(Debug, Clone, Copy, Eq, PartialEq, PartialOrd, Ord, Deserialize, Serialize)]
pub enum Severity {
- Error,
- Warning,
- Info,
Hint,
+ Info,
+ Warning,
+ Error,
+}
+
+impl Default for Severity {
+ fn default() -> Self {
+ Self::Hint
+ }
}
/// A range of `char`s within the text.