Developer Documentation

Documentation for contributing to lattice and understanding its internals.

New here? Read Start here first — five pages in order: contributor setup, the design spec, the architecture diagrams, the input pipeline, and how the editor boots. Everything else assumes those.

Reference. The crate map lays out every workspace crate by dependency, with what each owns; the Rust API is the rustdoc for all of them, built from main. The Plugin API reference is the WIT contract plugins build against.

The remaining sections are organised by the question you are asking, not by where the file lives in the repo — so a section may mix a design fragment, a guide and an audit when they cover the same subsystem.

  • Foundations — modes, keymaps, buffers, the actor seam, configuration.
  • Editing & motions — the vim grammar as implemented.
  • Rendering & display — how a buffer becomes pixels, across both renderers.
  • Buffers, panes & views — everything-is-a-buffer in practice.
  • Language intelligence — LSP, completion, tree-sitter, diagnostics.
  • Git & diffs — the diff engine and the magit port on top of it.
  • Plugins & extensibility — the WASM host and its seams.
  • Plugin API reference — every WIT seam, signature and type, generated from wit/.
  • AI & agents — the agent protocol and its UI.
  • Operations — the implementation ledger, benchmarks, releases.
  • Reviews & notes — point-in-time audits; historical context, not current design.

Source lives in docs/dev/ and stays organised by kind (architecture / guides / operations / audit / notes), because a design fragment and a slice plan are different artefacts with different lifetimes. site/data/dev-nav.toml maps that layout onto the sections above, and the docs sync fails if a page is missing from it — so this navigation cannot quietly fall behind the corpus.

AI & agents

The agent protocol, its UI surface, and using AI to develop lattice itself.

Buffers, panes & views

Everything-is-a-buffer in practice: multibuffers, panes, pickers, popups, terminals, synthetic views.

Editing & motions

The vim grammar as implemented: operators, text objects, indentation, registers.

Foundations

The substrate everything else composes from: modes, keymaps, buffers, the actor seam, configuration.

Git & diffs

The diff engine and the magit port built on it.

Language intelligence

LSP, completion, tree-sitter context, diagnostics and the compile loop.

Operations

The ledgers, the benchmark record, and how a release is cut.

Org mode

The outliner, TODO workflow, capture, agenda, habits and org-roam. Lattice's deepest plugin and the hardest test of the WASM seams — developed in its own repository, dhruvasagar/lattice-org-plugin, with no org-specific code in the editor. The user-facing page is under Configuration & extension; these are the design fragments, written for someone extending the editor.

Lattice Plugin API

Every seam of the WIT plugin API — functions, resources, types and fields — generated from wit/ so it cannot disagree with it.

Plugins & extensibility

The WASM host, the seams, and how a plugin contributes to the same registries the builtins use.

Rendering & display

How a buffer becomes pixels — the cell grid, display lines, spans, theme resolution, and the two renderer peers.

Reviews & notes

Point-in-time audits and working notes. Historical context rather than current design.

Start here

Read these five, in this order, before anything else.