Skip to content

Commit 4216e2b

Browse files
committed
Fix default diagnostic severity
1 parent 412c061 commit 4216e2b

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/language_server_protocol.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -638,10 +638,7 @@ impl LanguageClient {
638638
let mut match_groups: HashMap<_, Vec<_>> = HashMap::new();
639639

640640
for dn in diagnostics {
641-
let severity = dn
642-
.severity
643-
.unwrap_or(DiagnosticSeverity::Information)
644-
.to_int()?;
641+
let severity = dn.severity.unwrap_or(DiagnosticSeverity::Hint).to_int()?;
645642
match_groups
646643
.entry(severity)
647644
.or_insert_with(Vec::new)

src/sign.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ impl From<&Diagnostic> for Sign {
1313
let line = diagnostic.range.start.line;
1414
let severity = diagnostic.severity.unwrap_or(DiagnosticSeverity::Hint);
1515
let name = format!("LanguageClient{:?}", severity);
16-
let id = 75_000 + line * DiagnosticSeverity::Information as u64 + severity as u64;
16+
let id = 75_000 + line * DiagnosticSeverity::Hint as u64 + severity as u64;
1717

1818
Sign { id, line, name }
1919
}

0 commit comments

Comments
 (0)