mirror of https://github.com/helix-editor/helix
feat(lsp): sort diagnostic picker by severity
parent
fed3edcab7
commit
30394d406d
|
@ -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 {
|
let styles = DiagnosticStyles {
|
||||||
hint: cx.editor.theme.get("hint"),
|
hint: cx.editor.theme.get("hint"),
|
||||||
info: cx.editor.theme.get("info"),
|
info: cx.editor.theme.get("info"),
|
||||||
|
|
Loading…
Reference in New Issue