feat(lsp): sort diagnostic picker by severity

pull/13806/head
rolo 2025-06-20 16:10:43 -07:00
parent fed3edcab7
commit 30394d406d
1 changed files with 7 additions and 0 deletions

View File

@ -231,6 +231,13 @@ fn diag_picker(
}
}
flat_diag.sort_by(|a, b| {
a.diag
.severity
.unwrap_or(lsp::DiagnosticSeverity::HINT)
.cmp(&b.diag.severity.unwrap_or(lsp::DiagnosticSeverity::HINT))
});
let styles = DiagnosticStyles {
hint: cx.editor.theme.get("hint"),
info: cx.editor.theme.get("info"),