# 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. --- Part of **llimphi** — see [llimphi](../../README.md).