Helix: Orientation
Helix is a modal editor built around one strong ownership decision: the editor state is mutated in one foreground event loop, while I/O and other waiting work run asynchronously and return results to that loop.
The architectural center
terminal event ─┐
LSP message ────┼→ Application::event_loop → &mut Editor + &mut Compositor → render
timer/redraw ───┤ ↑
job callback ───┘ async Job returns closure
command → Transaction → Document → Rope + selections + history + LSP change
Design thesis
Helix permits background work to run concurrently but reserves all visible editor mutation for one foreground loop; jobs return owned results and a one-use instruction for applying them.
&mut Editormarks the single mutation authority.- Async jobs capture snapshots instead of borrowing foreground state.
- Version checks distinguish completion from continued relevance.
- Transactional edits update text and dependent coordinates together.
The important code is spread across deliberately narrow crates:
helix-coresupplies ropes, selections, transactions, syntax, and editing primitives;helix-viewowns documents, views, the editor model, and external-service registries;helix-termowns the application loop, commands, jobs, compositor, and terminal UI;helix-lspowns JSON-RPC transport and language-server processes;helix-eventsupplies redraw, status, hook, cancellation, and debounce machinery.
What we will preserve
The reconstruction preserves transactional edits, a layered compositor, a single mutation authority, concurrent background jobs that return callbacks, coalesced redraws, stale-result checks, and bounded shutdown. It does not need tree-sitter, every modal command, real LSP, themes, or terminal escape handling.