Expand description
Syntax → theme-element style bridge.
Maps a crate::style::Style syntax category to its builtin
syntax.* / diagnostic.* [lattice_theme::ElementId], and resolves
that to a concrete visual [lattice_theme::Style] via the active
theme’s resolved table. The single source of the syntax→element
mapping, shared by the cell builder, both renderers’ display-line
paths, and the diff overlay.
Home (DX.2, BC.6 diff extraction). This lived in lattice-host
(ui::theme) while the only consumers were host-side. It moves here so
lattice-diff (the diff overlay) can reach it without the host. It
belongs in lattice-syntax rather than the lattice-theme leaf
because the bridge is inherently syntax-aware — it takes a
lattice_syntax::Style — so the dependency points DOWN from this
higher crate onto the theme leaf, keeping lattice-theme a minimal
renderer-hot-path leaf (it deps only arc-swap + tracing). Host keeps a
façade re-export (lattice_host::ui::theme::resolve_syntax_style) so
existing call sites are unchanged.
Functions§
- resolve_
syntax_ style - Resolve a syntax category to its concrete [
lattice_theme::Style] via the resolved table. The replacement for the deletedTheme::syntax_stylecolormatch— colors now flow from the active theme’s palette through the resolved table. Every syntax consumer (cell builder, display-line paths, diff overlay) calls this, then adapts the hostStyleto its renderer-native form. - syntax_
element_ id - Map a
Stylesyntax category to its builtinsyntax.*[ElementId]. The single source of the syntax→element mapping, shared by the cell builder, both renderers’ display-line paths, and the diff overlay.