Neovim
Catalog v8.
Enables the Neovim text editor through the NixOS programs.neovim option.
Select
Choose it as the editor in the [shell] table:
[shell]
editor = "neovim"Apply the change after editing limanix.toml. editor = "astronvim" also installs Neovim, configured as AstroNvim.
Versions
Neovim comes from the catalog's base Nixpkgs revision. This module has no version lines. Inside the VM, nvim --version shows the installed version.
Use
Inside the VM, open a file with the nvim command:
nvim notes.mdThe vi and vim aliases also launch Neovim.
Make Neovim the default editor
The module leaves EDITOR at its NixOS default, nano. To make Neovim the editor for programs that read EDITOR, such as git commit, add a custom module with this setting:
{
programs.neovim.defaultEditor = true;
}Language servers
The module does not configure Neovim's LSP client. To use gopls from the Go module or rust-analyzer from the Rust module, configure Neovim's LSP client to start the server. Editor integration describes the options.
Configuration and integration
| Boundary | Contract |
|---|---|
| Settings | programs.neovim.*, including package, aliases and default editor |
| Personal state | ~/.config/nvim/, plus native XDG data, state and cache directories |
| Integration | Language modules supply servers; plain Neovim needs your LSP configuration |
| Services and capabilities | No daemon or language-support provider declarations |
Corner cases
| Case | Behavior or next step |
|---|---|
| No completion or LSP attachment | This module supplies the editor; select AstroNvim for the catalog setup |
| Default editor | Set programs.neovim.defaultEditor = true when you want to replace the base editor |
| User configuration | Existing Neovim configuration remains user-owned |
