< Back

neovimSource file

Options

aliases#

Additional program names to launch nvim under.

Type
listOf<string>
Example
[
  "vi"
  "vim"
]

devPlugins#

A list of plugin paths, which will be included in Neovim's 'runtimepath'.

Your personal config should be declared as a plugin here, and then loaded via the 'initLuaFile'/'initLuaContents' option.

Plugins that are set to strings will be treated as absolute paths and loaded impurely at runtime, rather than at buildtime. This allows for "hot reloading", which is helpful inside a devshell.

A plugin's structure is described here.

Type
listOf<either<path, string>>
Example
[
  # loading your personal config without hot reloading
  ./nvim
  # alternatively, setting up hot reloading inside a flake
  "/home/your-username/Projects/nixos-config/wrappers/neovim/nvim"
  # and if you don't use flakes, this works:
  (toString ./nvim)
]

extraLuaPackages#

A function returning a list of extra packages to be included in lua's $PATH.

Type
function
Example
ps: [ ps.jsregexp ]

extraPackages#

A list of extra packages to be included in neovim's $PATH

Type
listOf<derivation>
Example
with inputs.nixpkgs; [
  pkgs.lua-language-server
  pkgs.stylua
  pkgs.nixfmt
]

initLuaContents#

The contents of the init.lua file to be run on startup.

Disjoint with the initLuaFile option.

Type
string
Example
require("keybinds")
require("plugins")
require("options")

initLuaFile#

init.lua file to be run on startup.

Disjoint with the initLuaContents option.

Type
pathLike
Example
./init.lua

optPlugins#

A attrset of nvim plugins that are only loaded when packadd is called.

This follows the same ruleset as startPlugins.

Type
attrsOf<derivation>

package#

The neovim package to be wrapped.

Type
derivation

startPlugins#

An attrset of neovim plugins which are loaded on startup.

Type
attrsOf<derivation>
Example
{
  inherit (vimPlugins) fzf-lua nvim-surround;
  custom-plugin = callPackage ./custom-plugin.nix {};
}

treesitterPackage#

The nvim-treesitter package to be used.

This should also include the grammars as dependencies, which can be done via either nvim-treesitter.withAllGrammars or nvim-treesitter.withPlugins (p: [ p.foo p.bar ]).

Type
derivation
Example
pkgs.vimPlugins.nvim-treesitter.withAllGrammars