1# llimphi-widget-text-editor-core23The agnostic core of the code editor.
45Thin, **pure** layers (no IO, no Llimphi, no GPU) over `ropey`:
67- `buffer` — a `Rope` wrapper with (line, col) ↔ char_offset conversions.
8- `cursor` — `Cursor` + `Selection`; movement by char/word/line/page.
9- `ops` — pure editing operations over `(Buffer, Cursor) → (Buffer, Cursor)`.
10- `undo` — reversible stack: every operation is recorded as an `EditDelta`.
11- `bracket` — matching of parentheses, braces and brackets.
12- `find` — incremental search over the buffer.
13- `diagnostics` — the model of diagnostics (errors/warnings) by range.
14- `clipboard` — a clipboard abstraction (mem/null) that never touches the OS.
15- `highlight` — syntax highlighting with tree-sitter (Rust/Python/WAT/Plain).
1617Its only external coupling is `peniko::Color` in `highlight::SyntaxPalette` — a
18colour type, not the render stack. That leaves the core reusable from a TUI, a
19mini-REPL, a single-line text input, a web backend, and so on. The visual layer
20(state + view over Llimphi) lives in `llimphi-widget-text-editor`, which
21re-exports this whole core.
2223---
2425Part of **llimphi** — see [llimphi](../../README.md).
README.md
llimphi-widget-text-editor-core
The agnostic core of the code editor.
Thin, pure layers (no IO, no Llimphi, no GPU) over ropey:
buffer — a Rope wrapper with (line, col) ↔ char_offset conversions.
cursor — Cursor + Selection; movement by char/word/line/page.
ops — pure editing operations over (Buffer, Cursor) → (Buffer, Cursor).
undo — reversible stack: every operation is recorded as an EditDelta.
bracket — matching of parentheses, braces and brackets.
find — incremental search over the buffer.
diagnostics — the model of diagnostics (errors/warnings) by range.
clipboard — a clipboard abstraction (mem/null) that never touches the OS.
highlight — syntax highlighting with tree-sitter (Rust/Python/WAT/Plain).
Its only external coupling is peniko::Color in highlight::SyntaxPalette — a
colour type, not the render stack. That leaves the core reusable from a TUI, a
mini-REPL, a single-line text input, a web backend, and so on. The visual layer
(state + view over Llimphi) lives in llimphi-widget-text-editor, which
re-exports this whole core.