Unnamed repository; edit this file 'description' to name the repository.
Display error code only if not none
Gokul Soumya 2022-07-06
parent 0c10468 · commit a43bcc8
-rw-r--r--helix-term/src/commands/lsp.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/helix-term/src/commands/lsp.rs b/helix-term/src/commands/lsp.rs
index 81e16b22..a73148cc 100644
--- a/helix-term/src/commands/lsp.rs
+++ b/helix-term/src/commands/lsp.rs
@@ -125,6 +125,7 @@ impl ui::menu::Item for PickerDiagnostic {
NumberOrString::Number(n) => n.to_string(),
NumberOrString::String(s) => s.to_string(),
})
+ .map(|code| format!(" ({})", code))
.unwrap_or_default();
let truncated_path = path::get_truncated_path(self.url.path())
@@ -135,9 +136,7 @@ impl ui::menu::Item for PickerDiagnostic {
Span::raw(truncated_path),
Span::raw(": "),
Span::styled(&self.diag.message, style),
- Span::raw(" ("),
- Span::styled(code, style.add_modifier(Modifier::BOLD)),
- Span::raw(")"),
+ Span::styled(code, style),
])
}
}