|
|
@ -668,13 +668,16 @@ impl EditorView {
|
|
|
|
let hint = theme.get("hint");
|
|
|
|
let hint = theme.get("hint");
|
|
|
|
|
|
|
|
|
|
|
|
let mut lines = Vec::new();
|
|
|
|
let mut lines = Vec::new();
|
|
|
|
|
|
|
|
let background_style = theme.get("ui.background");
|
|
|
|
for diagnostic in diagnostics {
|
|
|
|
for diagnostic in diagnostics {
|
|
|
|
let style = Style::reset().patch(match diagnostic.severity {
|
|
|
|
let style = Style::reset()
|
|
|
|
Some(Severity::Error) => error,
|
|
|
|
.patch(background_style)
|
|
|
|
Some(Severity::Warning) | None => warning,
|
|
|
|
.patch(match diagnostic.severity {
|
|
|
|
Some(Severity::Info) => info,
|
|
|
|
Some(Severity::Error) => error,
|
|
|
|
Some(Severity::Hint) => hint,
|
|
|
|
Some(Severity::Warning) | None => warning,
|
|
|
|
});
|
|
|
|
Some(Severity::Info) => info,
|
|
|
|
|
|
|
|
Some(Severity::Hint) => hint,
|
|
|
|
|
|
|
|
});
|
|
|
|
let text = Text::styled(&diagnostic.message, style);
|
|
|
|
let text = Text::styled(&diagnostic.message, style);
|
|
|
|
lines.extend(text.lines);
|
|
|
|
lines.extend(text.lines);
|
|
|
|
}
|
|
|
|
}
|
|
|
|