Open-Source Wikis

/

Neovim

/

Systems

neovim/neovim

Systems

The C internals of Neovim, organized by subsystem. Each page below covers one architectural layer of src/nvim/. The cross-cutting capabilities that span multiple layers (LSP, treesitter, the embedded terminal) live under Features.

Map

graph TD
    subgraph IO["I/O & event loop"]
        EventLoop[Event loop]
        TUI[TUI]
        OS[OS / platform]
    end
    subgraph Core["Editor core"]
        State[Modes & state machine]
        Buf[Buffer & memline]
        Win[Windows & rendering]
        Auto[Autocmds & options]
        Undo[Undo]
        Regex[Regex & search]
    end
    subgraph Scripting["Scripting & API"]
        VimL[Vimscript / eval]
        Lua[Lua bridge]
        API[API & msgpack-rpc]
    end
    EventLoop --> State
    OS --> EventLoop
    TUI --> EventLoop
    State --> Buf
    State --> Win
    State --> Auto
    Buf --> Undo
    State --> Regex
    State --> VimL
    State --> API
    API --> Lua
    Lua --> VimL

Pages in this section

  • Event loopsrc/nvim/event/. The libuv core, the multi-queue, and how async events interleave with the input layer.
  • OS and platformsrc/nvim/os/. File system, process spawning, ptys, signals, environment, stdpaths.
  • TUIsrc/nvim/tui/. The built-in terminal client: termkey input, terminfo, the drawing loop.
  • Modes and the state machinesrc/nvim/state.c, normal.c, edit.c, ex_getln.c, terminal.c. The pushdown automaton that powers modal editing.
  • Buffer and memlinesrc/nvim/buffer.c, memline.c, memfile.c, bufwrite.c. How file content is represented, paged, and saved.
  • Windows and screen renderingsrc/nvim/window.c, drawscreen.c, drawline.c, grid.c, ui.c, ui_compositor.c. How a buffer becomes pixels.
  • Autocmds and editor eventssrc/nvim/autocmd.c, auevents.lua. The plugin extensibility hook.
  • Optionssrc/nvim/option.c, optionstr.c, options.lua. The single source of truth for every setting.
  • Undosrc/nvim/undo.c. The branching undo tree.
  • Regex and searchsrc/nvim/regexp.c, search.c, fuzzy.c. Two regex engines and the search/replace surface.
  • Marks and extmarkssrc/nvim/mark.c, extmark.c, marktree.c, decoration.c. Cursor positions, robust marks, and the B+-tree they live in.
  • Vimscript / evalsrc/nvim/eval/. The Vimscript interpreter, typvals, user functions.
  • Lua bridgesrc/nvim/lua/. LuaJIT integration, typval↔Lua conversion, treesitter binding.
  • API and msgpack-rpcsrc/nvim/api/, src/nvim/msgpack_rpc/. Public API surface and the RPC transport.

What is not in this section

  • The Lua stdlib (runtime/lua/vim/) is covered under Features. The C Lua bridge is here, the Lua functions written on top of it are there.
  • LSP, treesitter integration, diagnostics, and :terminal are in Features.
  • Build and CI tooling is in Tooling.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Systems – Neovim wiki | Factory