re-add tree

This commit is contained in:
Jana Dönszelmann 2026-04-02 10:35:03 +02:00
parent 2d9a029130
commit 049132b6ee
No known key found for this signature in database
2 changed files with 9 additions and 7 deletions

View file

@ -510,6 +510,7 @@ impl App {
literal: palette.secondary,
faded: palette.muted,
delimiter: palette.accent,
string: palette.accent,
}
}
@ -535,6 +536,7 @@ pub struct Styles {
border_highlighted: Style,
error: Style,
string: Color,
literal: Color,
faded: Color,
delimiter: Color,

View file

@ -167,7 +167,7 @@ impl Into<Line<'static>> for Styled<'_, LineText> {
spans.push(Span::from(""));
spans.push(Span::from(self.inner.tree));
if let Ok(parsed) = parse_input(&self.inner.message) {
spans.extend(if let Ok(parsed) = parse_input(&self.inner.message) {
let spans = into_spans(
parsed,
Config {
@ -215,7 +215,7 @@ impl Into<Line<'static>> for Styled<'_, LineText> {
SpanKind::Separator => style.fg(self.styles.faded),
SpanKind::Number => style.fg(self.styles.literal),
SpanKind::Literal => style.fg(self.styles.literal).dim(),
SpanKind::String => style.fg(self.styles.literal),
SpanKind::String => style.fg(self.styles.string),
SpanKind::Path => style.fg(self.styles.literal).underlined(),
SpanKind::Space(_) => style,
SpanKind::Constructor => style.fg(self.styles.literal),
@ -228,12 +228,12 @@ impl Into<Line<'static>> for Styled<'_, LineText> {
)
.collect();
Line::from(spans)
spans
} else {
Line::from(vec![
Span::from(self.inner.message).style(self.styles.default),
])
}
vec![Span::from(self.inner.message).style(self.styles.default)]
});
Line::from(spans)
}
}