Options
aliases
Aliases to symlink nvim to.
list of string
[ ]
[
"vi"
"vim"
]
appName
What to set $NVIM_APPNAME to
desktopEntry
Whether to enable neovim's desktop entry.
enable
Whether to enable mnw (Minimal Neovim Wrapper).
extraBinPath
Extra packages to be put in neovim's PATH
list of package
[ ]
[
pkgs.rg
pkgs.fzf
]
extraBuilderArgs
Extra attributes to pass to mkDerivation.
attribute set of anything
{ }
{
doInstallCheck = true;
extraInstallCheckInputs = [ pkgs.hello ];
installCheckPhase = ''
hello
'';
}
extraLuaPackages
A function which returns a list of extra needed lua packages.
function that evaluates to a(n) list of package
ps: [ ]
ps: [ ps.jsregexp ]
finalPackage
The final package to be consumed by the user
initLua
lua config text to load at startup
strings concatenated with "\n"
""
''
require("myConfig")
''
initViml
VimL config text to load at startup
strings concatenated with "\n"
""
''
echomsg 'hello world'
''
luaFiles
lua config files to load at startup
list of path in the Nix store
[ ]
[
(pkgs.writeText "init.lua" ''
print('hello world')
'')
]
neovim
The neovim package to use. Must be unwrapped
package
pkgs.neovim-unwrapped
inputs.neovim-nightly-overlay.packages.${pkgs.stdenv.system}.default
vimlFiles
VimL config files to load at startup
list of path in the Nix store
[ ]
[
(pkgs.writeText "init.vim" ''
echomsg 'hello world'
'')
]
wrapperArgs
A list of arguments to be passed to makeWrapper
list of string
[ ]
[
"--set-default"
"FZF_DEFAULT_OPTS"
"--layout=reverse --inline-info"
]
Plugins Configuration
Plugins are a package, a relative path, or an attribute set with a name/pname and a src:
{
pname = "hello";
src = <package or relative path>;
}start and startAttrs are added to /start and are require()-able while opt and optAttrs are added to /opt and must be packadd'd or loaded by lz.n/lazy.nvim before being require()'d
Everything in opt/start have their .dependencies added to startAttrs as well (for nixpkgs compatibility) plugins added directly to *Attrs do not resolve .dependencies
The assignment to *Attrs is done by resolving the pname or name of the package. so { pname = "foo"; ... would be put at *Attrs.foo
While if it's a path it'll be added by the path name and then the hash of the path so it's recommended to use *Attrs for path plugins:
{
plugins.startAttrs.fzf-lua = ./fzf-lua;
}*Attrs plugins can be set to null to stop them from being installed like:
{
plugins.startAttrs.fzf-lua = null;
}this is useful for not installing .dependencies from nixpkgs plugins
Any plugin in opt will override the plugin of the same name in start when propagating to *Attrs to ensure it's not loaded automatically.
TIP
there's no reason to use buildVimPlugin as all it does is copy files generate help tags and run checks. with mnw help tags are generated in the mnw builder
Full example:
{
plugins = {
# Plugins which can be reloaded without rebuilding
# see dev mode in the docs
dev.myconfig = {
# This is the recommended way of passing your config
pure = "myconfig";
impure = "/home/user/nix-config/nvim";
};
# List of plugins to load automatically
start = [
# you can pass vimPlugins from nixpkgs
pkgs.vimPlugins.lz-n
# path plugin
./plugin
# Custom plugin example
{
pname = "customPlugin";
src = pkgs.fetchFromGitHub {
owner = "";
repo = "";
ref = "";
hash = "";
};
# Plugins can have other plugins as dependencies
# this is mainly used in nixpkgs
# avoid it if possible
dependencies = [ ];
}
];
# Attribute set of plugins to load automatically
startAttrs = {
# nixpkgs plugin
oil-nvim = pkgs.vimPlugins.oil-nvim;
# Stop a dependency from a nixpkgs plugin from being installed
someDependency = null;
# Path plugin
foo = ./bar;
};
# List of plugins to not load automatically
# (load with packadd or a lazy loading plugin )
opt = [
pkgs.vimPlugins.oil-nvim
];
# Attribute set of plugins to not load automatically
optAttrs = {
# nixpkgs plugin
fzf-lua = pkgs.vimPlugins.fzf-lua;
# Disable a optional plugin
disableMe = null;
# Path plugin
bar = ./baz;
};
};
}plugins.dev
Plugins for use with devMode. You most likely want to put your config here. (automatically loaded)
attribute set of (submodule)
{ }
{
myconfig = {
pure = ./nvim;
impure = "/home/user/nix-config/nvim";
};
}
plugins.dev.<name>.impure
The impure absolute paths to the nvim plugin.
absolute path
"/home/user/nix-config/nvim"
plugins.dev.<name>.pure
The pure path to the nvim plugin.
plugins.opt
plugins.optAttrs
attribute set of (null or literal path or package)
{ }
plugins.start
plugins.startAttrs
attribute set of (null or literal path or package)
{ }
Provider Configuration
providers.nodeJs.enable
Whether to enable and configure the Node.js provider.
providers.nodeJs.neovimClientPackage
The neovim-node-client package to use.
package
pkgs.neovim-node-client
pkgs.neovim-node-client
providers.nodeJs.package
The Node.js package to use.
package
pkgs.nodejs
pkgs.nodejs_23
providers.perl.enable
Whether to enable and configure the perl provider.
providers.perl.extraPackages
Extra packages to be included in the perl environment.
Note: you probably want to include NeovimExt and Appcpanminus if you change this from it's default value.
function that evaluates to a(n) list of package
p: [
p.NeovimExt
p.Appcpanminus
]
p: [
p.NeovimExt
p.Appcpanminus
]
providers.perl.package
The perl package to use.
providers.python3.enable
Whether to enable and configure the python3 provider.
providers.python3.extraPackages
Extra packages to be included in the python3 environment.
Note: you probably want to include pynvim if you change this from it's default value.
function that evaluates to a(n) list of package
p: [ ppynvim ]
py: [
py.pynvim
py.pybtex
]
providers.python3.package
The python3 package to use.
package
pkgs.python3
pkgs.python39
providers.ruby.enable
Whether to enable and configure the ruby provider.
providers.ruby.env
The ruby bundlerEnv to use.
package
pkgs.bundlerEnv {
name = "neovim-ruby-env";
gemdir = ../ruby_provider;
postBuild = '''
rm $out/bin/{bundle,bundler}
''';
}
pkgs.bundlerEnv {
name = "neovim-ruby-env";
gemdir = ../ruby_provider;
}
providers.ruby.package
The ruby package to use.
package
programs.mnw.providers.ruby.env.ruby
pkgs.ruby