Expand description
Renderer-agnostic syntax-highlighting pipeline for the hjkl editor stack.
Fully synchronous: parse and highlight run on the main thread.
Call SyntaxLayer::set_language_for_path after opening a file,
SyntaxLayer::apply_edits after each batch of hjkl_engine::ContentEdits,
and SyntaxLayer::render_viewport to get styled spans for the visible rows.
Output is renderer-agnostic: RenderOutput::spans carries
(byte_start, byte_end, [StyleSpec]) triples.
A TUI adapter ([hjkl-syntax-tui]) maps these to ratatui::style::Style.
Structs§
- Color
- Resolved RGBA color (all channels 0–255).
- Diag
Sign - A single diagnostic sign emitted from the syntax pipeline.
- Modifiers
- Per-character text modifiers.
- Perf
Breakdown - Per-call sub-step timings. Kept for API compat (PerfBreakdown is re-exported
in the TUI shim and referenced from
:perfoverlay code). - Render
Output - Per-frame output of the syntax pipeline.
- Style
Spec - Foreground, background, and modifier flags for a syntax or UI element.
- Syntax
Layer - Per-App syntax highlighting layer. Multiplexes per-buffer state. Fully synchronous — no background thread.
Enums§
- Load
Event - Event emitted by
SyntaxLayer::poll_pending_loads. - Load
Event Kind - Exhaustive view of a
LoadEventfor dispatch callbacks. - SetLanguage
Outcome - Outcome of
SyntaxLayer::set_language_for_path.
Functions§
- build_
by_ row - Resolve flat highlight spans into a per-row span table sized to
row_count. - layer_
with_ theme - Build a
SyntaxLayerusing the given theme + language directory.
Type Aliases§
- Buffer
Id - Stable identifier for an open buffer.