Open-Source Wikis

/

Neovim

/

Neovim

neovim/neovim

Neovim

Neovim is a hyperextensible, Vim-based text editor that aggressively refactors the original Vim source to simplify maintenance, split work between multiple developers, and enable a clean separation between the editor core and its UIs. The repository ships a single binary, nvim, written primarily in C with a substantial Lua runtime that contributors are expected to extend instead of growing the C core.

What this project is

Neovim is a fork of Vim. It keeps Vim's modal editing model, Ex commands, registers, marks, options, autocommands, and Vimscript while replacing the underlying I/O and UI with a libuv-based event loop, an msgpack-rpc API, and a built-in LuaJIT interpreter. UIs (terminal or graphical) attach to the editor over RPC and consume redraw events; the same RPC channel is how editor plugins, language clients, and remote scripts drive the editor.

The C code lives in src/nvim/. The Lua "stdlib" and built-in plugins live under runtime/lua/vim/ and runtime/plugin/. Core data structures (windows, buffers, the undo tree, syntax state, the marktree-backed extmarks) are still C, but new functionality is increasingly implemented in Lua and called from C through nlua_call_vimfn / nlua_call_excmd.

Who this wiki is for

This wiki is meant for engineers who want to read or change the Neovim source. It assumes you have used Vim/Neovim as an editor and that you know what an autocmd, a buffer, and an Ex command are. If those are unfamiliar, start with the user docs at https://neovim.io/doc/.

Quick map

  • Want to build it? See Getting started.
  • Want a mental model of the program? See Architecture.
  • Confused by terms like "extmark", "marktree", "shada", "VIMRUNTIME"? See Glossary.
  • Want to send a patch? See How to contribute.
  • Looking for a specific subsystem? See Systems for the C internals or Features for cross-cutting capabilities like LSP and treesitter.

Headline numbers

  • ~337k lines of C in src/nvim/, ~95k lines of Lua in runtime/lua/.
  • ~36k commits since the initial Vim import in 2014-01-31.
  • ~1,200 commits in the last 90 days; >3,800 in the last year.
  • Public API surface: ~250 nvim_* RPC functions plus the vim.* Lua stdlib.

See By the numbers for the full breakdown.

Where Neovim came from

The first commit of this repo, Import vim from changeset v5628:c9cad40b4181, was made on 31 January 2014. Everything else is history that was either inherited from Vim or written on top of that import. The longer story (rewrites, deprecations, migrations) is in Lore.

License

Contributions made after commit b17d96 are Apache 2.0; code copied from Vim retains its original license. See LICENSE.txt at the repo root.

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

Neovim – Neovim wiki | Factory