Expand description
Render-time plugin contract — synchronous highlight requests.
[ARCH] Lifecycle hooks (on_issue_created, …) and structured events
(PluginEvent) handle async/asynchronous workflows. Render-time work
is different: the host is in the middle of drawing a frame and needs
Vec<TokenSpan> now with per-call latency in the low microseconds.
Plugins implement Plugin::highlight (see crate::traits::core).
The host calls it from a cache-miss path; the host is expected to
cache aggressively so the Lua roundtrip happens once per (lang,
content) pair, not once per frame.
Structs§
- Highlight
Request - What the host asks a highlight provider to render.
- Highlight
Response - What the plugin returns when it wants to highlight.
- Rgb
- 24-bit RGB colour. Maps cleanly onto
ratatui::Color::Rgb. - Token
Span - One styled run of text in a highlight response.