# Lattice > A modal, GPU-accelerated, plugin-first text editor in Rust. Combines vim's modal editing power with emacs's extensibility model on a non-blocking, multi-threaded core. Every link below is the page's Markdown source, mirrored from the repository at the deployed commit; the same pages render as HTML under https://dhruvasagar.github.io/lattice/docs/ and https://dhruvasagar.github.io/lattice/dev/. - **Writing a plugin?** Fetch [llms-full.txt](https://dhruvasagar.github.io/lattice/llms-full.txt): the authoring guide, the patterns guide and the whole plugin-API reference in one file. The same API as structured data is [plugin-api.json](https://dhruvasagar.github.io/lattice/plugin-api.json). - **Working on the editor itself?** Read [AGENTS.md](https://github.com/dhruvasagar/lattice/blob/main/AGENTS.md) in the repository first. ## Plugin API - [Plugin API reference](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api.md): what the WIT package `lattice:plugin-host@0.1.0` is, how to read it, every world and seam - [Worlds](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/worlds.md): what each world imports and exports, and its `register-*` entry points - [buffer](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/buffer.md): Mirrors the native `Document` / `Buffer` read seam (plugin-host.md §4.2, §9.6). - [command](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/command.md): Mirrors `CommandRegistry` + `CommandInvocation` + the closed `Effect` enum (lattice-grammar). - [completion-source](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/completion-source.md): Mirrors `lattice_completion` completion sources (PH7.6). - [config](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/config.md): Mirrors `ConfigRegistry` (lattice-config). - [context](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/context.md): The structural-**context** producer API (treesitter-context.md, TC.2): the scopes a pane pins above its text once their own header lines have scrolled away — the `nvim-treesitter-context` / sticky-scroll idea. - [dashboard](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/dashboard.md): CR.4: plugin-contributed dashboard sections. - [decorations](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/decorations.md): The decoration **producer** API (plugin-host.md §5 `decorations`, PH7.9), mirroring `Mode::gutter_decorations` + `GutterDecoration` (lattice-mode). - [error-parser](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/error-parser.md): CM.6: plugin-contributed compilation-output parsers. - [events](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/events.md): The event/hook **subscription** API (plugin-host.md §5 `events`, PH7.8). - [grammar](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/grammar.md): The grammar-**extension** API (plugin-host.md §4.1, PH7.7). - [grammar-callbacks](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/grammar-callbacks.md): The behavior callbacks a grammar plugin **exports**; the host calls one by `callback` id on dispatch (the PH7.3d callback-id trampoline). - [help](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/help.md): CR.3: plugin-contributed `:help` pages. - [host-services](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/host-services.md): Guest→host services (plugin-host.md §5). - [keymap](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/keymap.md): The `keymap` guest→host binding-registration seam (PL8.D.1). - [language](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/language.md): LG.3c: plugin-contributed languages. - [logging](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/logging.md): Guest→host structured logging (plugin observability Layer 2, design `docs/dev/architecture/plugin-observability.md` §8). - [media](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/media.md): The inline-media **producer** API (IM.6, `inline-media.md` §7). - [modes](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/modes.md): Mirrors the `Mode` trait declaration surface + `ModeRegistry` (lattice-mode). - [multibuffer-view-registry](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/multibuffer-view-registry.md): MV.1 — the seam by which a plugin **owns a multibuffer view**. - [multibuffer-view-source](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/multibuffer-view-source.md) - [picker-registry](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/picker-registry.md): OR.5b — the host import a picker plugin registers its sources through. - [picker-source](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/picker-source.md): Mirrors `PickerSourceGenerator` (`lattice_picker::source`). - [plugin-manager](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/plugin-manager.md): PM.7: the `require` seam — how a user's `init.rs` declares the plugins it wants (plugin-manager.md §3). - [project](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/project.md): Guest→host project resolution (PR.6, design `docs/dev/architecture/project-resolution.md` §6). - [scanned-excerpt-source](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/scanned-excerpt-source.md): OM.A1: plugin-contributed agenda rows. - [signs](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/signs.md): Mirrors the sign registry (`lattice_mode::SignRegistry`). - [theme](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/theme.md): Mirrors the theme-element registry (`lattice-theme`). - [transient-source](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/transient-source.md): TR.2b: plugin-contributed transient menus. - [tree-sitter](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/tree-sitter.md): Structural queries for plugins (plugin-treesitter-seam.md). - [types](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/types.md): Shared boundary records/variants — the owned, WIT-serializable mirrors of the native grammar + picker/completion types (plugin-host.md §4). - [ui](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/plugin-api/ui.md): The UI-contribution surface (design.md §9.4 `ui`): guest→host emits **data only**, never draw calls (§7, paramount #1). ## Plugin guides - [plugin-authoring](https://dhruvasagar.github.io/lattice/md/docs/dev/guides/plugin-authoring.md): toolchain, ABI and versions, the manifest, sync vs async seams, the runtime contract - [plugin-patterns](https://dhruvasagar.github.io/lattice/md/docs/dev/guides/plugin-patterns.md): recipes for each kind of contribution, with code quoted from plugins CI builds ## User documentation: Getting started Your first hour: the modal loop, the interactive tutor, and how to look anything up. - [First steps](https://dhruvasagar.github.io/lattice/md/docs/user/getting-started.md): First steps: the modal loop, opening and saving files, the command line, splits, and where to go next. - [Interactive tutor](https://dhruvasagar.github.io/lattice/md/docs/user/tutor-mode.md): The interactive tutor: a gamified lesson sequence (lives, score, high score) that teaches lattice from inside lattice. - [The launch dashboard](https://dhruvasagar.github.io/lattice/md/docs/user/dashboard-mode.md): dashboard-mode: the *dashboard* launch buffer — the splash page lattice opens with, every row a followable link into help, commands, or the tutor. - [Looking things up](https://dhruvasagar.github.io/lattice/md/docs/user/help.md): Help system: :describe-*, :apropos, :keymap, the prefix map, and mode-prefix syntax for :describe-key. - [The pending-chord hint](https://dhruvasagar.github.io/lattice/md/docs/user/which-key-mode.md): which-key-mode: the *which-key* hint popup — hold a prefix and see what can follow it, read from the live keymap rather than a static list. - [Cheatsheet](https://dhruvasagar.github.io/lattice/md/docs/user/cheatsheet.md): One-page keystroke reference: modes, motions, operators, git, LSP. - [Troubleshooting](https://dhruvasagar.github.io/lattice/md/docs/user/troubleshooting.md): When something doesn't work: plugins, LSP, colours, logs, and first-run problems. - [Known limitations](https://dhruvasagar.github.io/lattice/md/docs/user/known-limitations.md): What doesn't work yet at 0.9, and what is deliberately absent. ## User documentation: Editing The vim grammar, the mode system, and the `:` line — the vocabulary everything else composes from. - [Modal editing](https://dhruvasagar.github.io/lattice/md/docs/user/modal-editing.md): Modal editing: Normal / Insert / Visual / Select / Command / Search / Replace, the vim grammar (operators + motions + text objects + counts), and registers / marks / macros. - [Yank ring](https://dhruvasagar.github.io/lattice/md/docs/user/yank-ring.md): yank-ring: every yank and delete kept in a bounded, recency-ordered history. `{reg}` inserts a register, `` picks from the ring, and the pick lands wherever you opened it from. - [Cancelling a running operation](https://dhruvasagar.github.io/lattice/md/docs/user/cancellation.md): Cancelling a running operation with : what it stops (project search, LSP commands you asked for), what it deliberately leaves alone (automatic requests, background work), and why and are not the cancel key. - [Modes](https://dhruvasagar.github.io/lattice/md/docs/user/modes.md): Major + minor modes: what they are, how : toggles work, major-mode swaps, auto-activation hooks, the option-resolution model. - [The command line](https://dhruvasagar.github.io/lattice/md/docs/user/command-line-mode.md) - [Ex-commands](https://dhruvasagar.github.io/lattice/md/docs/user/ex-commands.md): The : line: built-in commands, arg schemas, tab completion, ranges, aliases, :g / :v / :s with live preview. - [Surround](https://dhruvasagar.github.io/lattice/md/docs/user/surround-mode.md): vim-surround: ds, cs, ys operators — delete, change, and add surrounding pairs of brackets, quotes, and tags. - [Formatting, reflow and wrapping](https://dhruvasagar.github.io/lattice/md/docs/user/formatting.md) ## User documentation: Navigating your project Buffers, panes and splits, the fuzzy picker, filesystem views, and project-wide search. - [Buffers & panes](https://dhruvasagar.github.io/lattice/md/docs/user/buffers.md): Buffers, panes, splits, file tree, navigation, theme customization. - [Picker & marginalia](https://dhruvasagar.github.io/lattice/md/docs/user/picker.md): The picker: :picker (files, grep, buffers, lines, outline, …) — one vertico-style fuzzy finder over every source, with typed marginalia columns and syntax-highlighted previews. - [File tree](https://dhruvasagar.github.io/lattice/md/docs/user/file-tree-mode.md): file-tree-mode: a hierarchical, read-only directory view — expand/collapse subdirectories, to open a file, `-` to hand off to oil-mode for editing. - [Oil — editable directories](https://dhruvasagar.github.io/lattice/md/docs/user/oil-mode.md): oil-mode: a flat, writable directory listing — edit the buffer like text, :w runs the diff as filesystem operations (rename / create / delete). - [Project search](https://dhruvasagar.github.io/lattice/md/docs/user/project-search-mode.md): Project-wide search: :search streams matches into a multibuffer; g/{motion} greps a motion's text; jumps to source, gr refreshes. - [Multibuffer views](https://dhruvasagar.github.io/lattice/md/docs/user/multibuffer-mode.md): Multibuffer views: excerpts from many files composed into one editable buffer — the substrate behind search results and project-wide diff. - [image-mode](https://dhruvasagar.github.io/lattice/md/docs/user/image-mode.md): image-mode: the major mode for a buffer whose file is a picture — `:e diagram.png` shows the image. - [Narrow](https://dhruvasagar.github.io/lattice/md/docs/user/narrow-mode.md): Focus on a region with the `zn` operator or `:narrow`; edit in the view, changes flow to the source; `:widen` restores. Stacked narrow is always one hop. - [Scan views](https://dhruvasagar.github.io/lattice/md/docs/user/scan-view-mode.md): Scan views: a plugin's own command walks your files, asks a scan source which rows they carry, and collects the answers into one ordered multibuffer; jumps to source, gr rescans. - [The clock report](https://dhruvasagar.github.io/lattice/md/docs/user/scan-view-clockreport-mode.md): scan-view-clockreport-mode: cr puts a clock report at the top of a scan view — clocked time totalled up the outline, with own time beside each total. - [The `files` picker](https://dhruvasagar.github.io/lattice/md/docs/user/picker-files.md): picker-files: fuzzy-find a file under the project root and open it — `:files [root]`. - [The `file-pick` picker](https://dhruvasagar.github.io/lattice/md/docs/user/picker-file-pick.md): picker-file-pick: choose a file and hand its path to whatever asked — the `files` list, as a value instead of an open. - [The `dir-pick` picker](https://dhruvasagar.github.io/lattice/md/docs/user/picker-dir-pick.md): picker-dir-pick: browse the filesystem one directory at a time and choose a directory — goes in, comes back out. - [The `recent` picker](https://dhruvasagar.github.io/lattice/md/docs/user/picker-recent.md): picker-recent: the files you have edited this session, newest first — `:recent`. - [The buffer picker](https://dhruvasagar.github.io/lattice/md/docs/user/picker-buffers.md): picker-buffers: switch to an open buffer by name — `:b`, `:buffers`, `b`. - [The `grep` picker](https://dhruvasagar.github.io/lattice/md/docs/user/picker-grep.md): picker-grep: live project-wide text search — hits re-run as you type, jumps to one, sends them all to the error list. - [The `lines` picker](https://dhruvasagar.github.io/lattice/md/docs/user/picker-lines.md): picker-lines: fuzzy-filter the current buffer's lines and jump to one, with the buffer previewed in place. - [The `outline` picker](https://dhruvasagar.github.io/lattice/md/docs/user/picker-outline.md): picker-outline: jump to a function, type or other symbol in the current buffer, from its tree-sitter outline. - [The `jumps` picker](https://dhruvasagar.github.io/lattice/md/docs/user/picker-jumps.md): picker-jumps: the position history — jump list and mark ring in one — newest first; jumps back to any point. - [The `marks` picker](https://dhruvasagar.github.io/lattice/md/docs/user/picker-marks.md): picker-marks: every mark you have set, by name; jumps to it like a backtick. - [The `registers` picker](https://dhruvasagar.github.io/lattice/md/docs/user/picker-registers.md): picker-registers: see every register's contents on one line each and paste the one you pick, like `\"xp`. - [The `yank-ring` picker](https://dhruvasagar.github.io/lattice/md/docs/user/picker-yank-ring.md): picker-yank-ring: pick anything you recently yanked or deleted and insert it where you are — the buffer, the `:` or `/` line, or another picker's query. - [The `commands` picker](https://dhruvasagar.github.io/lattice/md/docs/user/picker-commands.md): picker-commands: the command palette — every ex-command with its key, arguments and doc; runs it or opens the `:` line for its arguments. - [The `history` picker](https://dhruvasagar.github.io/lattice/md/docs/user/picker-history.md): picker-history: every `:` command you have run, newest first; puts it back on the `:` line to edit — it does not run it. - [The `search-history` picker](https://dhruvasagar.github.io/lattice/md/docs/user/picker-search-history.md): picker-search-history: every `/` pattern you have searched, newest first; puts it back on the search line to edit — it does not search. - [The `pane-buffer-history` picker](https://dhruvasagar.github.io/lattice/md/docs/user/picker-pane-buffer-history.md): picker-pane-buffer-history: the buffers THIS pane has shown, newest first; walks back to one without losing the way forward. - [The `snippets` picker](https://dhruvasagar.github.io/lattice/md/docs/user/picker-snippets.md): picker-snippets: browse the snippets for this buffer's language and expand one at the cursor. - [The `colorscheme` picker](https://dhruvasagar.github.io/lattice/md/docs/user/picker-colorscheme.md): picker-colorscheme: try every theme live as you move through the list; keeps one, puts yours back. - [The magit pickers](https://dhruvasagar.github.io/lattice/md/docs/user/picker-magit.md): picker-magit: the pickers magit opens when a command needs you to name a branch, commit, tag, ref, remote, revision or stash. - [The LSP result pickers](https://dhruvasagar.github.io/lattice/md/docs/user/picker-lsp-locations.md): picker-lsp-locations: the list the language server's answers open in — definitions, references, symbols, call and type hierarchies, diagnostics, and code actions. - [The LSP server picker](https://dhruvasagar.github.io/lattice/md/docs/user/picker-lsp-instances.md): picker-lsp-instances: choose which running language server's log or protocol trace to open, when more than one matches. - [A language server's question](https://dhruvasagar.github.io/lattice/md/docs/user/picker-lsp-message-request.md): picker-lsp-message-request: a language server is asking you a question — pick an answer, or to answer none. - [The AI session picker](https://dhruvasagar.github.io/lattice/md/docs/user/picker-ai-sessions.md): picker-ai-sessions: choose which AI agent session's log to open, when more than one is running. ## User documentation: Code intelligence Language support, language servers, completion, folding, and the build/error loop. - [Languages](https://dhruvasagar.github.io/lattice/md/docs/user/languages.md): Bundled languages, coverage roadmap, and how to add a new language (tree-sitter or otherwise). - [Language Server Protocol (LSP)](https://dhruvasagar.github.io/lattice/md/docs/user/lsp.md): LSP integration: servers, capabilities, attach lifecycle, diagnostics, every :lsp-* command in context. - [The lsp-mode gate](https://dhruvasagar.github.io/lattice/md/docs/user/lsp-mode.md): Per-buffer gate that controls whether LSP features run (auto-activation, toggle, what's gated, programmatic API). - [Insert-mode completion](https://dhruvasagar.github.io/lattice/md/docs/user/completion.md): Insert-mode completion: triggers, sources, popup keymap, configuration, troubleshooting. - [Folding](https://dhruvasagar.github.io/lattice/md/docs/user/folding.md): Manual + computed folds, fold operators, navigation, auto-open on search. - [Compilation](https://dhruvasagar.github.io/lattice/md/docs/user/compilation-mode.md): :compile runs any CLI tool, streams its output into *compilation*, and parses file:line:col references into the error list; gr recompiles, jumps, :problems groups the results. - [Projects](https://dhruvasagar.github.io/lattice/md/docs/user/project.md): Every buffer belongs to a project, found by walking up for a marker like .git or Cargo.toml; :project-root reports it and the marker that decided it, and project.root-markers configures the list. - [The error list](https://dhruvasagar.github.io/lattice/md/docs/user/error-list.md): The error list: a navigable list of file:line:col locations walked with :next-error/:previous-error (]qq/[qq) — populated by :compile (any CLI tool), browsed with :error-list, grouped with :problems. ## User documentation: Git & diffs Magit — a full git porcelain inside the editor — plus general two- and three-way diffing. - [Magit](https://dhruvasagar.github.io/lattice/md/docs/user/magit.md): Magit: git porcelain inside Lattice — status, commit, diff, log, blame, stash, branch, rebase, and transient dispatch menus, all backed by the VCS subsystem. - [The status buffer](https://dhruvasagar.github.io/lattice/md/docs/user/magit-status-mode.md): magit-status: the primary magit workhorse — staged / unstaged / untracked sections, stashes, recent commits, lazy inline diffs (via = for files, for stashes), a dedicated per-file diff buffer (dd), line-, hunk- and file-level staging (s/u/x), commit (cc/ca), and context-aware visit (, which opens the commit buffer for a commit entry and, inside a diff, the right version of the file at the right line and column). - [Transient menus](https://dhruvasagar.github.io/lattice/md/docs/user/magit-transient.md): magit-transient: the dispatch (C-c g) and file-dispatch (C-c f) grouped menus. C-c g opens every magit buffer plus fetch/pull/push, with commit and stash submenus. C-c f stages/unstages/discards and opens diff/log/blame for the current buffer's file. Keys follow Emacs magit's own. The substrate also supports toggleable flags, argument inputs, and live previews, but no shipped magit menu uses them yet. - [Diff & merge](https://dhruvasagar.github.io/lattice/md/docs/user/diff-mode.md): Diff & merge: :diffthis / :diffsplit, hunk navigation (]c / [c), do / dp to get/put hunks, sign column, two- and three-way. ## User documentation: Terminal & AI agents Shells as buffers, coding agents wired to the editor, and background-work notifications. - [Terminal buffers](https://dhruvasagar.github.io/lattice/md/docs/user/terminal-mode.md): Terminal - [Claude Code](https://dhruvasagar.github.io/lattice/md/docs/user/claude-code-mode.md): Claude Code IDE integration: :claude launches the agent wired to this editor, it reads/edits via reviewable side-by-side diffs you accept or reject with :diff-accept / :diff-reject. - [opencode](https://dhruvasagar.github.io/lattice/md/docs/user/opencode-mode.md): :opencode launches the opencode agent's native TUI in a terminal buffer inside lattice — you get opencode's full interface (prompt, / commands, model switching, history, edit review) with opencode-mode layered on for lattice navigation. - [Notifications](https://dhruvasagar.github.io/lattice/md/docs/user/notifications.md): Notifications: corner popups telling you that work with no buffer finished — a fetch, a push — with options for how many show and how long they stay. ## User documentation: Appearance Soft-wrap and layout, the 21 builtin themes, and the per-pane status row. - [Display & layout](https://dhruvasagar.github.io/lattice/md/docs/user/display.md): Display & layout: soft-wrap, tab width, scroll-off margin, indentation guides, and whitespace markers. - [Themes & colorschemes](https://dhruvasagar.github.io/lattice/md/docs/user/themes.md): Themes & colorschemes: :colorscheme to switch (with a live-preview picker), the 21 builtin themes, :customize to tweak options, and registering your own palette. - [Modeline](https://dhruvasagar.github.io/lattice/md/docs/user/modeline.md): The per-pane status row: zones, the modal tag, and configuring the layout. - [Mouse](https://dhruvasagar.github.io/lattice/md/docs/user/mouse.md) ## User documentation: Configuration & extension Typed options, the Rust/WASM `init.rs`, and the plugin host. - [Options](https://dhruvasagar.github.io/lattice/md/docs/user/options.md): Typed configuration: :set syntax, layered resolution (defaults / TOML / runtime / mode contributions / per-buffer), groups, and how to find every registered option. - [init.rs](https://dhruvasagar.github.io/lattice/md/docs/user/init.md): Configuring lattice in Rust/WASM with init.rs: where it lives, how it loads and reloads, and worked examples for event handlers, custom grammar (commands / motions / text-objects / operators / ex-commands), keybindings, and options. - [The leader](https://dhruvasagar.github.io/lattice/md/docs/user/emacs-keys-mode.md): The emacs-keys tribute: a default-on, configurable leader binding emacs-style buffer / file / window chords on top of vim modal editing. - [When a key does nothing](https://dhruvasagar.github.io/lattice/md/docs/user/troubleshooting-keys.md): A key does nothing: how to tell a missing binding from a keystroke the terminal never sent. - [Plugins](https://dhruvasagar.github.io/lattice/md/docs/user/plugins.md): The WASM plugin host: loading + managing plugins, the capability + fuel + crash-isolation security model, the :plugins manager view, boundary-trace observability, and the plugin API introspection commands. - [Core plugins](https://dhruvasagar.github.io/lattice/md/docs/user/core-plugins.md) - [Org-mode](https://dhruvasagar.github.io/lattice/md/docs/user/org.md): Org-mode in lattice: what the org plugin gives you, how to install it, the `org.*` options, and where its full reference lives. ## User documentation: Reference Per-surface keymap tables: one buffer kind, one minor mode, or one language grammar each. Reach for search. - [text-mode](https://dhruvasagar.github.io/lattice/md/docs/user/text-mode.md): text-mode: the fallback major mode for plain text — full vim grammar, no tree-sitter parser, no LSP, no mode-scoped option overrides. - [rust-mode](https://dhruvasagar.github.io/lattice/md/docs/user/rust-mode.md): rust-mode: the major mode for Rust files (`.rs`) — tree-sitter highlighting, folds, symbols, and text objects. - [python-mode](https://dhruvasagar.github.io/lattice/md/docs/user/python-mode.md): python-mode: the major mode for Python files (`.py`, `.pyw`) — tree-sitter highlighting, folds, symbols, and text objects. - [javascript-mode](https://dhruvasagar.github.io/lattice/md/docs/user/javascript-mode.md): javascript-mode: the major mode for JavaScript files (`.js`, `.mjs`, `.cjs`) — tree-sitter highlighting, folds, symbols, and text objects. - [typescript-mode](https://dhruvasagar.github.io/lattice/md/docs/user/typescript-mode.md): typescript-mode: the major mode for TypeScript files (`.ts`, `.mts`, `.cts`) — tree-sitter highlighting, folds, symbols, and text objects. - [tsx-mode](https://dhruvasagar.github.io/lattice/md/docs/user/tsx-mode.md): tsx-mode: the major mode for TSX files (`.tsx`) — tree-sitter highlighting, folds, symbols, and text objects. - [go-mode](https://dhruvasagar.github.io/lattice/md/docs/user/go-mode.md): go-mode: the major mode for Go files (`.go`) — tree-sitter highlighting, folds, symbols, and text objects. - [c-mode](https://dhruvasagar.github.io/lattice/md/docs/user/c-mode.md): c-mode: the major mode for C files (`.c`, `.h`) — tree-sitter highlighting, folds, symbols, and text objects. - [cpp-mode](https://dhruvasagar.github.io/lattice/md/docs/user/cpp-mode.md): cpp-mode: the major mode for C++ files (`.cpp`, `.cc`, `.cxx`, `.hpp`, `.hh`, `.hxx`) — tree-sitter highlighting, folds, symbols, and text objects. - [java-mode](https://dhruvasagar.github.io/lattice/md/docs/user/java-mode.md): java-mode: the major mode for Java files (`.java`) — tree-sitter highlighting, folds, symbols, and text objects. - [ruby-mode](https://dhruvasagar.github.io/lattice/md/docs/user/ruby-mode.md): ruby-mode: the major mode for Ruby files (`.rb`, `.ruby`) — tree-sitter highlighting, folds, symbols, and text objects. - [lua-mode](https://dhruvasagar.github.io/lattice/md/docs/user/lua-mode.md): lua-mode: the major mode for Lua files (`.lua`) — tree-sitter highlighting, folds, symbols, and text objects. - [bash-mode](https://dhruvasagar.github.io/lattice/md/docs/user/bash-mode.md): bash-mode: the major mode for Bash files (`.sh`, `.bash`, `.zsh`, `.fish`) — tree-sitter highlighting, folds, symbols, and text objects. - [html-mode](https://dhruvasagar.github.io/lattice/md/docs/user/html-mode.md): html-mode: the major mode for HTML files (`.html`, `.htm`, `.xhtml`) — tree-sitter highlighting, folds, symbols, and text objects. - [css-mode](https://dhruvasagar.github.io/lattice/md/docs/user/css-mode.md): css-mode: the major mode for CSS files (`.css`) — tree-sitter highlighting, folds, symbols, and text objects. - [json-mode](https://dhruvasagar.github.io/lattice/md/docs/user/json-mode.md): json-mode: the major mode for JSON files (`.json`) — tree-sitter highlighting, folds, symbols, and text objects. - [toml-mode](https://dhruvasagar.github.io/lattice/md/docs/user/toml-mode.md): toml-mode: the major mode for TOML files (`.toml`) — tree-sitter highlighting, folds, symbols, and text objects. - [yaml-mode](https://dhruvasagar.github.io/lattice/md/docs/user/yaml-mode.md): yaml-mode: the major mode for YAML files (`.yaml`, `.yml`) — tree-sitter highlighting, folds, symbols, and text objects. - [sql-mode](https://dhruvasagar.github.io/lattice/md/docs/user/sql-mode.md): sql-mode: the major mode for SQL files (`.sql`) — tree-sitter highlighting, folds, symbols, and text objects. - [markdown-mode](https://dhruvasagar.github.io/lattice/md/docs/user/markdown-mode.md): markdown-mode: the major mode for .md files AND for every help buffer — hand-written highlight queries, folds by section. - [Tables](https://dhruvasagar.github.io/lattice/md/docs/user/table-mode.md): table-mode: pipe-table editing in markdown and org — walks the cells and realigns, t moves and inserts rows and columns, and your table's own style is kept. - [wit-mode](https://dhruvasagar.github.io/lattice/md/docs/user/wit-mode.md): wit-mode: the major mode for WIT files (`.wit`) — tree-sitter highlighting and folds for the WebAssembly Interface Type language. - [magit-core-mode](https://dhruvasagar.github.io/lattice/md/docs/user/magit-core-mode.md): magit-core-mode: the shared minor mode active in every magit buffer — gr to refresh, q to close, ]]/[[ to move between sections, TAB to fold, S/U/C/i/yr for repo-level operations, and A/_/O to act on the commit under the cursor. Diff-content chords, including ]f/[f, live on magit-hunk-mode. - [magit-nav-mode](https://dhruvasagar.github.io/lattice/md/docs/user/magit-nav-mode.md): magit-nav-mode: the magit chords that are safe in any buffer — section navigation and folding, split out so editable magit views can have them without the bare letters. - [magit-hunk-mode](https://dhruvasagar.github.io/lattice/md/docs/user/magit-hunk-mode.md): magit-hunk-mode: the shared minor mode active in every magit buffer that renders a diff — s/u/x to stage, unstage and discard the hunk at cursor, a/- to move one hunk of a commit, ]c/[c to navigate, to visit the right version at the right line. It also owns the folds inside a diff: per file and per @@ hunk, nothing finer. - [magit-global-mode](https://dhruvasagar.github.io/lattice/md/docs/user/magit-global-mode.md): magit-global-mode: the always-active entry chords — C-x g opens magit-status, C-c g the repo dispatch transient, C-c f the file dispatch transient. - [magit-diff-mode](https://dhruvasagar.github.io/lattice/md/docs/user/magit-diff-mode.md): magit-diff-mode: a read-only diff buffer with line-, hunk- and file-level stage/unstage (s/u) — repo-wide against HEAD, or scoped to one file and one baseline. - [magit-commit-mode](https://dhruvasagar.github.io/lattice/md/docs/user/magit-commit-mode.md): magit-commit-mode: the commit compose buffer — a read-only staged diff on top, an editable message below, C-c C-c to commit and C-c C-k to abort. - [magit-revision-mode](https://dhruvasagar.github.io/lattice/md/docs/user/magit-revision-mode.md): magit-revision-mode: one historical commit in full — git show —stat -p, opened by on a SHA anywhere one appears. Read-only; visits a file as of that commit. - [magit-file-revision-mode](https://dhruvasagar.github.io/lattice/md/docs/user/magit-file-revision-mode.md): magit-file-revision-mode: one file's content at one fixed reference — a commit SHA, or the index (`staged`). Read-only, never opened directly. - [magit-log-mode](https://dhruvasagar.github.io/lattice/md/docs/user/magit-log-mode.md): magit-log-mode: the commit history graph — git log —oneline —graph —decorate, on a row opens that commit's detail. Repo-wide or scoped to one file. - [magit-blame-mode](https://dhruvasagar.github.io/lattice/md/docs/user/magit-blame-mode.md): magit-blame-mode: a minor mode that annotates the file you are reading with a heading above each run of lines sharing a commit — your code keeps its syntax highlighting. - [magit-refs-mode](https://dhruvasagar.github.io/lattice/md/docs/user/magit-refs-mode.md): magit-refs-mode: every branch, remote-tracking branch and tag in one buffer, with each branch's ahead/behind against its upstream. shows the commit a ref points at; c checks out. - [magit-branch-mode](https://dhruvasagar.github.io/lattice/md/docs/user/magit-branch-mode.md): magit-branch-mode: the local branch list — checks out, c runs the create wizard, d deletes (asks first), m merges into the current branch. - [magit-remote-mode](https://dhruvasagar.github.io/lattice/md/docs/user/magit-remote-mode.md): magit-remote-mode: the configured remotes with their URLs — a adds, r renames, d removes, u sets the URL, p prunes. - [magit-submodule-mode](https://dhruvasagar.github.io/lattice/md/docs/user/magit-submodule-mode.md): magit-submodule-mode: the configured submodules with git's own status marker — a adds, u updates, s syncs, d removes (asks first). - [magit-stash-mode](https://dhruvasagar.github.io/lattice/md/docs/user/magit-stash-mode.md): magit-stash-mode: the stash list — a apply, p pop, d drop (asks first), z create, to preview a stash's patch. - [magit-stash-show-mode](https://dhruvasagar.github.io/lattice/md/docs/user/magit-stash-show-mode.md): magit-stash-show-mode: one stash's patch — git stash show -p, opened by in the stash list. Read-only, fixed content. - [magit-rebase-mode](https://dhruvasagar.github.io/lattice/md/docs/user/magit-rebase-mode.md): magit-rebase-mode: the interactive rebase todo — an editable pick list built from real history, C-c C-c to run it, C-c C-k to abort (asks first). - [magit-notes-mode](https://dhruvasagar.github.io/lattice/md/docs/user/magit-notes-mode.md): magit-notes-mode: the note attached to one commit, as an editable buffer. C-c C-c saves, C-c C-k closes without saving; clearing the buffer removes the note. - [magit-cherry-mode](https://dhruvasagar.github.io/lattice/md/docs/user/magit-cherry-mode.md): magit-cherry-mode: which of your commits are not upstream yet, and which already are under a different SHA. opens a commit; A cherry-picks it. - [Project diff](https://dhruvasagar.github.io/lattice/md/docs/user/magit-project-diff-mode.md): magit-project-diff-mode: identity marker for the project-diff view — every changed file as one editable multibuffer. - [completion-mode](https://dhruvasagar.github.io/lattice/md/docs/user/completion-mode.md): completion-mode: the per-buffer gate for insert-mode completion — active on writable buffers, which is why is a no-op in help or oil. - [completion-popup-mode](https://dhruvasagar.github.io/lattice/md/docs/user/completion-popup-mode.md): completion-popup-mode: active only while the completion popup is open — owns C-n / C-p / C-y / Tab / CR and the rest of the popup keymap. - [buffer-words-mode](https://dhruvasagar.github.io/lattice/md/docs/user/buffer-words-mode.md): buffer-words-mode: contributes the completion source that offers words already present in your buffers. - [path-completion-mode](https://dhruvasagar.github.io/lattice/md/docs/user/path-completion-mode.md): path-completion-mode: contributes filesystem-path completion, so typing a path in a buffer offers real directory entries. - [tree-sitter-completion-mode](https://dhruvasagar.github.io/lattice/md/docs/user/tree-sitter-completion-mode.md): tree-sitter-completion-mode: contributes a syntax-aware completion source drawn from the buffer's parse tree. - [lsp-completion-mode](https://dhruvasagar.github.io/lattice/md/docs/user/lsp-completion-mode.md): lsp-completion-mode: contributes the language-server completion source — the type-aware candidates, produced asynchronously. - [snippet-mode](https://dhruvasagar.github.io/lattice/md/docs/user/snippet-mode.md): snippet-mode: the per-buffer snippet gate — C-x C-s expands directly, and it brings the snippet completion source with it. - [snippet-completion-mode](https://dhruvasagar.github.io/lattice/md/docs/user/snippet-completion-mode.md): snippet-completion-mode: puts snippet triggers into the completion popup alongside buffer words, tree-sitter symbols, and LSP candidates. - [active-snippet-mode](https://dhruvasagar.github.io/lattice/md/docs/user/active-snippet-mode.md): active-snippet-mode: live only while a snippet is expanding — Tab and S-Tab walk its placeholders, Esc leaves the session. - [hover-mode](https://dhruvasagar.github.io/lattice/md/docs/user/hover-mode.md): hover-mode: marks the hover popup buffer so it auto-dismisses when the document cursor moves. Content is markdown; markdown-mode renders it. - [lsp-log-mode](https://dhruvasagar.github.io/lattice/md/docs/user/lsp-log-mode.md): lsp-log-mode: the subsystem-wide *lsp* buffer — every LSP event across every server, streamed live. :lsp-log. - [lsp-server-log-mode](https://dhruvasagar.github.io/lattice/md/docs/user/lsp-server-log-mode.md): lsp-server-log-mode: one language server's own log — *lsp::*, scoped to a single instance. :lsp-server-log. - [lsp-trace-log-mode](https://dhruvasagar.github.io/lattice/md/docs/user/lsp-trace-log-mode.md): lsp-trace-log-mode: the LSP protocol trace for one server instance — the requests and responses on the wire. :lsp-trace. - [References view](https://dhruvasagar.github.io/lattice/md/docs/user/lsp-references-mode.md): lsp-references-mode: identity marker for a references view — a multibuffer with this minor active IS the references list, and it is editable. - [lsp-diagnostics-mode](https://dhruvasagar.github.io/lattice/md/docs/user/lsp-diagnostics-mode.md): lsp-diagnostics-mode: the diagnostic surfaces — gutter severity marks, `gl` for the message under the cursor, and the `]d` / `[d` walk. - [lsp-nav-mode](https://dhruvasagar.github.io/lattice/md/docs/user/lsp-nav-mode.md): lsp-nav-mode: per-buffer gate for textDocument/definition, declaration, typeDefinition and implementation — turn it off and the go-to chords report no server for this buffer. - [lsp-hover-mode](https://dhruvasagar.github.io/lattice/md/docs/user/lsp-hover-mode.md): lsp-hover-mode: per-buffer gate for textDocument/hover — turn it off and `K` stops asking the server; the popup no longer appears for this buffer. - [lsp-signature-mode](https://dhruvasagar.github.io/lattice/md/docs/user/lsp-signature-mode.md): lsp-signature-mode: per-buffer gate for textDocument/signatureHelp — turn it off and parameter hints stop appearing in this buffer. - [lsp-symbols-mode](https://dhruvasagar.github.io/lattice/md/docs/user/lsp-symbols-mode.md): lsp-symbols-mode: per-buffer gate for textDocument/documentSymbol and workspace/symbol — turn it off and the symbol pickers come back empty for this buffer. - [lsp-code-action-mode](https://dhruvasagar.github.io/lattice/md/docs/user/lsp-code-action-mode.md): lsp-code-action-mode: per-buffer gate for textDocument/codeAction — turn it off and the code-action list is empty for this buffer. - [lsp-format-mode](https://dhruvasagar.github.io/lattice/md/docs/user/lsp-format-mode.md): lsp-format-mode: per-buffer gate for textDocument/formatting and rangeFormatting — turn it off and `:lsp-format` reports no server for this buffer. - [lsp-rename-mode](https://dhruvasagar.github.io/lattice/md/docs/user/lsp-rename-mode.md): lsp-rename-mode: per-buffer gate for textDocument/rename — turn it off and `:lsp-rename` reports no server for this buffer. - [lsp-document-highlight-mode](https://dhruvasagar.github.io/lattice/md/docs/user/lsp-document-highlight-mode.md): lsp-document-highlight-mode: per-buffer gate for textDocument/documentHighlight — turn it off and occurrences stop being highlighted in this buffer. - [lsp-selection-range-mode](https://dhruvasagar.github.io/lattice/md/docs/user/lsp-selection-range-mode.md): lsp-selection-range-mode: per-buffer gate for textDocument/selectionRange — turn it off and expand-selection falls back to the syntactic implementation. - [lsp-inlay-hint-mode](https://dhruvasagar.github.io/lattice/md/docs/user/lsp-inlay-hint-mode.md): lsp-inlay-hint-mode: per-buffer gate for textDocument/inlayHint — turn it off and inlay hints disappear from this buffer. - [lsp-semantic-tokens-mode](https://dhruvasagar.github.io/lattice/md/docs/user/lsp-semantic-tokens-mode.md): lsp-semantic-tokens-mode: per-buffer gate for textDocument/semanticTokens — turn it off and highlighting falls back to tree-sitter alone. - [lsp-folding-mode](https://dhruvasagar.github.io/lattice/md/docs/user/lsp-folding-mode.md): lsp-folding-mode: sets foldmethod=lsp on its buffers, so folds come from textDocument/foldingRange instead of indentation. - [lsp-progress-mode](https://dhruvasagar.github.io/lattice/md/docs/user/lsp-progress-mode.md): lsp-progress-mode: marks a buffer whose server reports $/progress; the detail rides in the `lsp` modeline element. - [line-numbers-mode](https://dhruvasagar.github.io/lattice/md/docs/user/line-numbers-mode.md): line-numbers-mode: Shows absolute line numbers in the gutter Same state as `:set number` / `:set nu`. - [relative-line-numbers-mode](https://dhruvasagar.github.io/lattice/md/docs/user/relative-line-numbers-mode.md): relative-line-numbers-mode: Numbers each line by its distance from the cursor, so `8k` / `3j` can be read straight off the gutter Same state as `:set relativenumber` / `:set rnu`. - [wrap-mode](https://dhruvasagar.github.io/lattice/md/docs/user/wrap-mode.md): wrap-mode: Wraps long lines to the window width instead of scrolling horizontally Same state as `:set wrap`. - [whitespace-show-mode](https://dhruvasagar.github.io/lattice/md/docs/user/whitespace-show-mode.md): whitespace-show-mode: Renders tabs, trailing spaces and other whitespace as visible glyphs Same state as `:set list`. - [current-line-highlight-mode](https://dhruvasagar.github.io/lattice/md/docs/user/current-line-highlight-mode.md): current-line-highlight-mode: Tints the line the cursor is on Same state as `:set cursorline`. - [read-only-mode](https://dhruvasagar.github.io/lattice/md/docs/user/read-only-mode.md): read-only-mode: Refuses edits to this buffer - [command-line-expand-mode](https://dhruvasagar.github.io/lattice/md/docs/user/command-line-expand-mode.md): command-line-expand-mode: C-x C-e grows the one-row : line into a multi-line band for editing a long command comfortably. - [search-line-mode](https://dhruvasagar.github.io/lattice/md/docs/user/search-line-mode.md): search-line-mode: the / and ? search line as a real one-line buffer — full editing, C-p/C-n history, and BS on an empty pattern cancels. - [prompt-line-mode](https://dhruvasagar.github.io/lattice/md/docs/user/prompt-line-mode.md): prompt-line-mode: the generic one-line prompt — whenever something asks you to type an answer, this is the buffer you type it in. - [preview-mode](https://dhruvasagar.github.io/lattice/md/docs/user/preview-mode.md): preview-mode: marks a pane showing a picker preview — an isolated, read-only projection that never touches the buffer you came from. - [terminal-normal-mode](https://dhruvasagar.github.io/lattice/md/docs/user/terminal-normal-mode.md): terminal-normal-mode: vim motions, search and yank over a terminal's scrollback — the mode a terminal buffer sits in when you're not typing at the shell. - [terminal-insert-mode](https://dhruvasagar.github.io/lattice/md/docs/user/terminal-insert-mode.md): terminal-insert-mode: keystrokes go to the shell, not the editor. `i` enters it in a terminal buffer, `C-\\ C-n` leaves. - [repl-mode](https://dhruvasagar.github.io/lattice/md/docs/user/repl-mode.md): repl-mode: makes i/a/o/A/I/O jump to the prompt and enter Insert, so 'start typing' always lands at the input line of a transcript buffer. - [ai-conversation-mode](https://dhruvasagar.github.io/lattice/md/docs/user/ai-conversation-mode.md): ai-conversation-mode: the agent conversation buffer — a read-only transcript with an editable prompt. CR sends, C-j newlines, C-c interrupts, C-t toggles trust. - [ai-permission-mode](https://dhruvasagar.github.io/lattice/md/docs/user/ai-permission-mode.md): ai-permission-mode: the popup answering an agent's permission request — CR selects the option under the cursor, Esc or q defers it. - [ai-log-mode](https://dhruvasagar.github.io/lattice/md/docs/user/ai-log-mode.md): ai-log-mode: one agent process's log — *ai::*, streamed live. Where to look when an agent won't start or dies mid-turn. - [pi-mode](https://dhruvasagar.github.io/lattice/md/docs/user/pi-mode.md): pi-mode: marks the terminal buffer running the pi agent. :pi launches it; pi's own TUI owns the conversation, so lattice adds nothing on the hot path. - [help-mode](https://dhruvasagar.github.io/lattice/md/docs/user/help-mode.md): help-mode: the minor mode that turns a markdown buffer into a help buffer — read-only, with following links. - [messages-mode](https://dhruvasagar.github.io/lattice/md/docs/user/messages-mode.md): messages-mode: the *messages* audit log — every echo-area message lattice has shown, kept in a real buffer you can search, yank, and scroll back through. - [notifications-mode](https://dhruvasagar.github.io/lattice/md/docs/user/notifications-mode.md): notifications-mode: the *notifications* buffer — every live and queued notification, where runs a notification's action and d dismisses it. - [plugins-mode](https://dhruvasagar.github.io/lattice/md/docs/user/plugins-mode.md): plugins-mode: the *plugins* manager buffer — a live status table of every loaded plugin, where lowercase acts on the row under the cursor and uppercase acts on every row. - [problems-minor-mode](https://dhruvasagar.github.io/lattice/md/docs/user/problems-minor-mode.md): problems-minor-mode: marks a multibuffer as the *problems* view — :copen groups error locations as editable excerpts, one per entry, grouped by file. - [diff-conflict-mode](https://dhruvasagar.github.io/lattice/md/docs/user/diff-conflict-mode.md): diff-conflict-mode: the conflict-resolution surface. Activates on buffers whose diff session carries conflict regions, and contributes the fugitive-style d2o/d3o/d2p/d3p/dB chords. - [Plugin boundary trace](https://dhruvasagar.github.io/lattice/md/docs/user/plugin-trace-mode.md): plugin-trace-mode: major mode for the *plugin-trace* buffer — the host/guest boundary trace, drained off-thread. - [gr — refresh a view](https://dhruvasagar.github.io/lattice/md/docs/user/refreshable-view-mode.md): refreshable-view-mode: gives a generated view the shared `gr` refresh chord; each view declares which of its own actions gr should run. - [Tab — fold a block](https://dhruvasagar.github.io/lattice/md/docs/user/foldable-view-mode.md): foldable-view-mode: gives a grouped view the shared / fold chords; each view declares which of its own actions should run. - [Listing presentation](https://dhruvasagar.github.io/lattice/md/docs/user/directory-listing-mode.md): directory-listing-mode: the shared presentation minor for directory listings — icons, alignment and styling for oil and the file tree alike. ## Developer documentation: Start here Read these five, in this order, before anything else. - [Contributor setup](https://dhruvasagar.github.io/lattice/md/docs/dev/guides/developing-lattice.md) - [The design spec](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/design.md) - [Architecture diagrams](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/diagrams.md) - [Input Pipeline — key identity, dispatch, and keystroke→glyph latency](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/input-pipeline.md) - [Boot composition — generic-primitives-first + per-subsystem `install`](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/boot-composition.md) ## Developer documentation: Foundations The substrate everything else composes from: modes, keymaps, buffers, the actor seam, configuration. - [Crate map](https://dhruvasagar.github.io/lattice/md/docs/dev/reference/crates.md) - [Mode Architecture (developer reference)](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/mode-architecture.md) - [Keymap Architecture (developer reference)](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/keymap-architecture.md) - [Kind-agnostic buffer + mode infrastructure (H-series)](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/kind-agnostic-buffers.md) - [Unified command dispatch — one path for `:`, the keymap, and plugins](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/typed-motion-dispatch.md) - [Actor-seam discipline](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/actor-seam-discipline.md) - [Host ↔ provider boundary](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/host-provider-boundary.md) - [Buffer-local options](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/buffer-local-options.md) - [Configuration & init lifecycle](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/config-and-init.md) - [Typed configuration — a declared schema, not a TOML blob](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/typed-configuration.md) - [Foreground cancellation (``)](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/cancellation.md) - [Session persistence](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/session-persistence.md) - [Authoring a mode's keymap](https://dhruvasagar.github.io/lattice/md/docs/dev/notes/mode-keymap-authoring.md) ## Developer documentation: Editing & motions The vim grammar as implemented: operators, text objects, indentation, registers. - [`auto-indent` — indentation from tree-sitter, formatting from external tools](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/auto-indent.md) - [`text-reflow` — reflow, auto-wrap, and who gets to format a range](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/text-reflow.md) - [surround-mode — vim-surround semantics as a native minor mode](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/surround-mode.md) - [`table-mode` — pipe tables, once](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/table-mode.md) - [Select mode (vim Select) — design fragment](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/select-mode.md) - [Multi-cursor](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/multi-cursor.md) - [The `g/` search operator (developer reference)](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/search-operator.md) - [Narrow Mode](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/narrow-mode.md) - [Fold architecture](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/fold-architecture.md) - [Tree-sitter Structural Motions](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/treesitter-motions.md) - [Tree-sitter Text Objects](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/tree-sitter-text-objects.md) - [The yank ring and the yank picker (YR)](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/yank-ring.md) - [System clipboard integration (CB)](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/clipboard.md) - [Which-key](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/which-key.md) - [Emacs-keys — a configurable `` leader (tribute layer)](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/emacs-keys.md) ## Developer documentation: Rendering & display How a buffer becomes pixels — the cell grid, display lines, spans, theme resolution, and the two renderer peers. - [Cell-grid renderer architecture](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/cell-grid-renderer.md) - [Display-line model (retiring the per-character cell grid)](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/display-line.md) - [Concealment](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/conceal.md) - [Soft line-wrapping (`:set wrap`)](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/soft-wrap.md) - [Horizontal scroll](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/horizontal-scroll.md) - [Virtual Rows](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/virtual-rows.md) - [Inline media — Path 4](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/inline-media.md) - [Span layering](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/span-layering.md) - [Incremental highlight & viewport-scoped cells](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/incremental-highlight.md) - [Indentation guides](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/indent-guides.md) - [Gutter signs](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/gutter-signs.md) - [Ligature rendering](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/ligatures.md) - [Theme system](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/theme-system.md) - [Authoring themes](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/theme-authoring.md) - [Headerline](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/headerline.md) - [Modeline architecture (developer reference)](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/modeline.md) - [Marginalia — typed annotations for completion candidates](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/marginalia.md) - [Decoration retention across focus](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/decoration-retention.md) - [Owner-write caret survival](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/owner-write-caret.md) - [GPUI Window Chrome & Control](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/gpui-window-chrome.md) - [Mouse Architecture (developer reference)](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/mouse.md) ## Developer documentation: Buffers, panes & views Everything-is-a-buffer in practice: multibuffers, panes, pickers, popups, terminals, synthetic views. - [Multibuffer Views](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/multibuffer-views.md) - [Multibuffer is a regular buffer (integration audit)](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/multibuffer-is-a-regular-buffer.md) - [Multibuffer stale sources](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/multibuffer-stale-sources.md) - [Multibuffer Per-Excerpt Syntax Highlighting (K.4.7)](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/multibuffer-syntax.md) - [Pane groups](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/pane-groups.md) - [Pane buffer history](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/pane-buffer-history.md) - [Pane zoom](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/pane-zoom.md) - [Picker Architecture (developer reference)](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/picker.md) - [Picker preview syntax highlighting (PH)](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/picker-preview-highlight.md) - [Preview isolation (PI)](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/preview-isolation.md) - [Popup API](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/popup-api.md) - [Popup unification — a popup is a regular buffer in a box](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/popup-unification.md) - [The focused surface](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/focused-surface.md) - [Rich minibuffer](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/rich-minibuffer.md) - [`directory-listing-mode` — one minor mode owning entry icons and highlighting](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/directory-listing-mode.md) - [Listing mode-ownership — the majors own entry navigation](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/listing-mode-ownership.md) - [Terminal Buffer as a Document (Normal/Visual sub-states)](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/terminal-as-document.md) - [Terminal Mode (developer reference)](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/terminal-mode.md) - [Notifications — telling the user about work with no buffer](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/notifications.md) - [Dashboard](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/dashboard.md) - [Tutor Mode — Architecture](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/tutor-mode.md) - [Autoread — design fragment (external-change detection + refresh)](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/autoread.md) ## Developer documentation: Language intelligence LSP, completion, tree-sitter context, diagnostics and the compile loop. - [LSP Architecture (developer reference)](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/lsp-architecture.md) - [LSP feature reference](https://dhruvasagar.github.io/lattice/md/docs/dev/notes/lsp-features.md) - [Insert-Mode Completion (design)](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/insert-completion.md) - [Completion / picker unification under `CompletionPipeline`](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/completion-pipeline-unification.md) - [Tree-sitter context — sticky scope headers](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/treesitter-context.md) - [Error list](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/error-list.md) - [Compilation Mode](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/compilation-mode.md) - [IDE protocol host — lattice as a Claude Code agent peer](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/ide-protocol.md) - [Project Resolution](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/project-resolution.md) - [Project commands — choosing the project, then the verb](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/project-commands.md) ## Developer documentation: Git & diffs The diff engine and the magit port built on it. - [Diff System](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/diff-system.md) - [Diff extraction — design fragment (`lattice-host::diff` → the `lattice-diff` crate)](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/diff-extraction.md) - [Intra-line diff refinement](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/diff-refinement.md) - [N-way Diff Membership (D.8)](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/n-way-diff-membership.md) - [Magit — Git porcelain as a core plugin](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/magit.md) - [magit-blame — annotations on the file, not a buffer full of text](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/magit-blame.md) - [magit-hunk-mode — the mode that owns diff *content*](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/magit-hunk-mode.md) - [Hunk-level staging](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/magit-hunk-staging.md) - [Magit project diff (the editable cross-file diff view)](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/magit-project-diff.md) - [Magit repo scoping — the repository is the active buffer's, not the shell's](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/magit-repo-scoping.md) ## Developer documentation: Plugins & extensibility The WASM host, the seams, and how a plugin contributes to the same registries the builtins use. - [Writing a plugin](https://dhruvasagar.github.io/lattice/md/docs/dev/guides/plugin-authoring.md) - [Plugin patterns](https://dhruvasagar.github.io/lattice/md/docs/dev/guides/plugin-patterns.md) - [Plugin Host (Phase 7) — WASM Component Model extension substrate](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/plugin-host.md) - [Contributable registries — help topics and dashboard sections](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/contributable-registries.md) - [Plugin-contributed languages](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/plugin-languages.md) - [Plugin manager — declarative sources, build-on-boot, use-package for WASM](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/plugin-manager.md) - [Where a plugin's data lives](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/plugin-data-location.md) - [Plugin observability](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/plugin-observability.md) - [Plugin tree-sitter seam — structural queries for plugins](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/plugin-treesitter-seam.md) - [Plugin inline decorations](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/plugin-inline-decorations.md) - [auto-pair — the first bundled plugin (auto + manual pairing)](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/plugin-auto-pair.md) - [Plugin-owned multibuffer views](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/plugin-multibuffer-views.md) - [Plugin-contributed transient menus](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/plugin-transients.md) - [Mode option overrides across the plugin seam](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/plugin-mode-options.md) - [A guest publishing events — built-in and custom](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/guest-event-publishing.md) - [Who owns `wit/`, and what happens when a plugin is behind it](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/wit-ownership.md) - [Cross-file writes](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/cross-file-writes.md) - [Plugin host audit](https://dhruvasagar.github.io/lattice/md/docs/dev/audit/plugin-host-architecture.md) - [Plugin observability review](https://dhruvasagar.github.io/lattice/md/docs/dev/audit/plugin-observability-review.md) ## Developer documentation: 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. - [Org-mode as a plugin](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/org-mode.md) - [Org TODO keywords, and what colour they are](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/org-todo-keywords.md) - [Org capture: many templates, a capture buffer](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/org-capture.md) - [Org capture templates: one shape, three axes](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/org-capture-templates.md) - [Org capture: many at once, savable, and stackable](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/org-capture-drafts.md) - [The org agenda as a dashboard](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/org-agenda.md) - [Org habits — repeating tasks, and the consistency graph](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/org-habits.md) - [Org-roam](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/org-roam.md) ## Developer documentation: AI & agents The agent protocol, its UI surface, and using AI to develop lattice itself. - [AI agent protocol — lattice as an ACP client for Claude Code, opencode & friends](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/ai-agent-protocol.md) - [Agent integration — the `EditorAccess` port, and the adapters built on it](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/agent-integration.md) - [Agent conversation UI](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/agent-ui.md) - [ACP UX enhancements — permission surface, usage metadata, status, and queue](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/acp-ux-enhancements.md) - [Pi integration](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/pi.md) - [AI-assisted development](https://dhruvasagar.github.io/lattice/md/docs/dev/notes/ai-assisted-development.md) ## Developer documentation: Operations The ledgers, the benchmark record, and how a release is cut. - [Implementation ledger](https://dhruvasagar.github.io/lattice/md/docs/dev/operations/implementation.md) - [Benchmark record](https://dhruvasagar.github.io/lattice/md/docs/dev/operations/benchmarks.md) - [Verification checklist](https://dhruvasagar.github.io/lattice/md/docs/dev/operations/verify.md) - [Cutting a release](https://dhruvasagar.github.io/lattice/md/docs/dev/operations/releasing.md) - [Release pipeline](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/release-pipeline.md) - [The 0.9 launch contract](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/launch-0.9.md) - [Embedded user-docs size budget](https://dhruvasagar.github.io/lattice/md/docs/dev/operations/embedded-docs-budget.md) - [How the API docs are generated](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/api-docs.md) - [Lighthouse — the LSP server manager (bundled plugin)](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/lighthouse.md) ## Developer documentation: Reviews & notes Point-in-time audits and working notes. Historical context rather than current design. - [About these audits](https://dhruvasagar.github.io/lattice/md/docs/dev/audit/README.md) - [Keymap API design review — 2026-06-02](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/keymap-api-review.md) - [Comparison: Zed](https://dhruvasagar.github.io/lattice/md/docs/dev/architecture/comparison-zed.md) - [Note: effect dispatch](https://dhruvasagar.github.io/lattice/md/docs/dev/audit/effect-dispatch.md) - [Note: wide-char ghosting](https://dhruvasagar.github.io/lattice/md/docs/dev/audit/terminal-wide-char-ghosting.md) - [Picker implementation notes](https://dhruvasagar.github.io/lattice/md/docs/dev/notes/pickers.md) ## Optional - [Rust API (rustdoc)](https://dhruvasagar.github.io/lattice/api/): every workspace crate, built from `main`; for editor contributors, not plugin authors