Open-Source Wikis

/

Neovim

/

Features

neovim/neovim

Features

Cross-cutting capabilities that span multiple subsystems and that users mainly interact with through Lua. Everything in this section is implemented — at least at the user-facing layer — in runtime/lua/vim/. The C code that supports them lives in src/nvim/; the Lua stdlib does the orchestration, parsing, and policy.

Pages in this section

  • LSP clientruntime/lua/vim/lsp/. The built-in Language Server Protocol client.
  • Treesitter integrationruntime/lua/vim/treesitter/ plus src/nvim/lua/treesitter.c. Incremental parsing, highlighting, queries.
  • Diagnosticsruntime/lua/vim/diagnostic/. The unified diagnostic display (errors, warnings, hints from any source).
  • Embedded terminalsrc/nvim/terminal.c plus src/nvim/vterm/. The :terminal command and pty-attached buffers.
  • Package manager (vim.pack)runtime/lua/vim/pack.lua. The built-in plugin manager.
  • Snippetsruntime/lua/vim/snippet.lua. The LSP-snippet-grammar engine and expansion.
  • UI providers (vim.ui)runtime/lua/vim/ui.lua and runtime/lua/vim/ui/. vim.ui.select, vim.ui.input, vim.ui.img, vim.ui_attach.
  • Defaults and providersruntime/lua/vim/_defaults.lua, runtime/lua/vim/provider/. The "out of the box" feel and the bridges to other-language plugin hosts.

What ties them together

graph TD
    Editor[Editor core<br/>buffers, autocmds, extmarks]
    LSP[vim.lsp]
    TS[vim.treesitter]
    Diag[vim.diagnostic]
    Term[":terminal"]
    Pack[vim.pack]
    UI[vim.ui]
    Snip[vim.snippet]

    Editor --> LSP
    Editor --> TS
    Editor --> Term
    LSP --> Diag
    TS --> Editor
    Diag --> Editor
    LSP --> UI
    LSP --> Snip
    Pack --> Editor

Most features are wired into the editor through three hooks:

  1. Autocmds (BufRead, LspAttach, TextChanged) — the editor tells the feature when state changed.
  2. Extmarks — the feature paints virtual text, signs, and highlights without owning a renderer.
  3. The APInvim_* functions for buffer mutation, window control, etc.

This factoring is why a feature like LSP can be a few thousand lines of Lua with no editor-core changes: it observes via autocmds, decides what to display via Lua, and pushes that display through extmarks.

Where features are not

  • Build, test, and tooling are in Tooling.
  • The vim.* Lua stdlib primitives that aren't tied to one feature (vim.fs, vim.iter, vim.system, vim.version, vim.uv) are documented in runtime/doc/lua.txt. They're the substrate, not features in themselves.
  • C-level subsystems (event loop, regex, undo, autocmds, options, marks) are in Systems.

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

Features – Neovim wiki | Factory