re-add tree
This commit is contained in:
parent
2d9a029130
commit
049132b6ee
2 changed files with 9 additions and 7 deletions
|
|
@ -510,6 +510,7 @@ impl App {
|
||||||
literal: palette.secondary,
|
literal: palette.secondary,
|
||||||
faded: palette.muted,
|
faded: palette.muted,
|
||||||
delimiter: palette.accent,
|
delimiter: palette.accent,
|
||||||
|
string: palette.accent,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -535,6 +536,7 @@ pub struct Styles {
|
||||||
border_highlighted: Style,
|
border_highlighted: Style,
|
||||||
error: Style,
|
error: Style,
|
||||||
|
|
||||||
|
string: Color,
|
||||||
literal: Color,
|
literal: Color,
|
||||||
faded: Color,
|
faded: Color,
|
||||||
delimiter: Color,
|
delimiter: Color,
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ impl Into<Line<'static>> for Styled<'_, LineText> {
|
||||||
spans.push(Span::from("┃ "));
|
spans.push(Span::from("┃ "));
|
||||||
spans.push(Span::from(self.inner.tree));
|
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(
|
let spans = into_spans(
|
||||||
parsed,
|
parsed,
|
||||||
Config {
|
Config {
|
||||||
|
|
@ -215,7 +215,7 @@ impl Into<Line<'static>> for Styled<'_, LineText> {
|
||||||
SpanKind::Separator => style.fg(self.styles.faded),
|
SpanKind::Separator => style.fg(self.styles.faded),
|
||||||
SpanKind::Number => style.fg(self.styles.literal),
|
SpanKind::Number => style.fg(self.styles.literal),
|
||||||
SpanKind::Literal => style.fg(self.styles.literal).dim(),
|
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::Path => style.fg(self.styles.literal).underlined(),
|
||||||
SpanKind::Space(_) => style,
|
SpanKind::Space(_) => style,
|
||||||
SpanKind::Constructor => style.fg(self.styles.literal),
|
SpanKind::Constructor => style.fg(self.styles.literal),
|
||||||
|
|
@ -228,12 +228,12 @@ impl Into<Line<'static>> for Styled<'_, LineText> {
|
||||||
)
|
)
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
Line::from(spans)
|
spans
|
||||||
} else {
|
} else {
|
||||||
Line::from(vec![
|
vec![Span::from(self.inner.message).style(self.styles.default)]
|
||||||
Span::from(self.inner.message).style(self.styles.default),
|
});
|
||||||
])
|
|
||||||
}
|
Line::from(spans)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue