Expand description
Styled overlays on buffer text (ARCHITECTURE.md §10).
Three classes exist here from the first commit — syntax, diagnostics, and agent proposal hunks — even though only hunks are wired up in Phase 03. That is deliberate and §10 is explicit about it: designing the decoration system with agent hunks in mind is a Phase-03 requirement, not a Phase-07 afterthought. A layer built for syntax highlighting alone acquires assumptions (spans always exist in the buffer; spans are always recomputable from the text) that agent hunks then violate.
Decorations are stored as char offsets, like everything else in this crate. The
conversion to screen cells happens once, at the render boundary — see ui::text.
Structs§
- Decoration
- A styled span over a char range of the buffer.
- Decoration
Set - The decorations attached to a buffer.
- Line
Decoration - A decoration clipped to one line, with offsets relative to that line’s start.
Enums§
- Decoration
Class - What a decoration is for.
- Hunk
Side - Which side of a proposed change a hunk decoration marks.
- Severity
- Severity of a language-server diagnostic. Rendered in Phase 07; the class exists now so the layer is not shaped around a single consumer.
- Syntax
Kind - A syntax token class. Tree-sitter fills these in during the phase’s last slice.