Expand description
GPU renderer — implements madori::RenderCallback backed by garasu’s
glyphon-wrapped text renderer. Each frame:
- Locks the shared
EditorState. - Collects visible buffer lines into a single string.
- Builds a glyphon
Buffer(re-created each frame — phase 1.B; phase 2 will diff + reuse). - Prepares + renders through
madori::RenderContext::text.
Colors are the Vellum fleet theme (warm aged-paper Nord-matte),
sourced from escriba_ui::chrome::ChromePalette so the GPU chrome matches
the rest of the fleet (mado, tear, frostmourne, …) and escriba’s TUI
backend. Text is rendered in snow1 (#E2DBC8, warm cream foreground)
over a night0 (#16140E, parchment ground) background. The status
line is rendered in ice_cyan (#94BBB8, the matte accent).
Structs§
- GpuRenderer
- The GPU render callback.
Functions§
- build_
ecosystem - The highlight registry escriba renders through: tree-sitter grammars
(hikari-ts) take precedence for the languages they cover, and the zero-dep
table backend fills every other language. So
.rsgets real tree-sitter highlighting while.py/.lisp/.json/ … get the batteries-included table lexer — and both flow through the same coverage-completeHlClasspartition. Registration order is load-bearing:Ecosystem::resolvereturns the first matching plugin, so tree-sitter (registered first) wins for its languages; the table backend is skipped for any language tree-sitter already covers (no duplicate). If the tree-sitter host fails to build, the table backend covers everything — never a panic, never an empty registry. - cursor_
shape - The
CursorShapethe GPU backend should draw formode. Derived from the single typedMode::cursor_shapemapping shared with the TUI backend — so the GPU cursor (once it gains a dedicated glyph; today the buffer text carries the caret) renders the same shape the TUI does for any given mode. Exposed now so the shape is a typed value at the GPU layer, not a renderer-local literal later. - mode_
color - Mode indicator color — used by higher-layer rendering paths that want a glance-readable color. Named by ROLE so the hue follows the active theme: Normal info, Insert success, Visual accent, Command warning.
- mode_
glyph - Map an editor
Modeto its fleetSignalfromEscribaSignals.
Type Aliases§
- Shared
State - Shared handle to the editor state — both the GPU renderer (reads) and
the madori
on_eventcallback (writes) hold one.