Skip to content

Options

aliases

Aliases to symlink nvim to.

Type
plaintext
list of string
Default
nix
[ ]
Example
nix
[
  "vi"
  "vim"
]

appName

What to set $NVIM_APPNAME to

Type
plaintext
string
Default
nix
"mnw"
Example
nix
"gerg"

desktopEntry

Whether to enable neovim's desktop entry.

Type
plaintext
boolean
Default
nix
true
Example
nix
false

enable

Whether to enable mnw (Minimal Neovim Wrapper).

Type
plaintext
boolean
Default
nix
false
Example
nix
true

extraBinPath

Extra packages to be put in neovim's PATH

Type
plaintext
list of package
Default
nix
[ ]
Example
nix
[
  pkgs.rg
  pkgs.fzf
]

extraBuilderArgs

Extra attributes to pass to mkDerivation.

Type
plaintext
attribute set of anything
Default
nix
{ }
Example
nix
{
  doInstallCheck = true;
  extraInstallCheckInputs = [ pkgs.hello ];
  installCheckPhase = ''
    hello
  '';
}

extraLuaPackages

A function which returns a list of extra needed lua packages.

Type
plaintext
function that evaluates to a(n) list of package
Default
nix
ps: [ ]
Example
nix
ps: [ ps.jsregexp ]

finalPackage

The final package to be consumed by the user

Type
plaintext
package

initLua

lua config text to load at startup

Type
plaintext
strings concatenated with "\n"
Default
nix
""
Example
nix
''
  require("myConfig")
''

initViml

VimL config text to load at startup

Type
plaintext
strings concatenated with "\n"
Default
nix
""
Example
nix
''
  echomsg 'hello world'
''

luaFiles

lua config files to load at startup

Type
plaintext
list of path in the Nix store
Default
nix
[ ]
Example
nix
[
  (pkgs.writeText "init.lua" ''
    print('hello world')
  '')
]

neovim

The neovim package to use. Must be unwrapped

Type
plaintext
package
Default
nix
pkgs.neovim-unwrapped
Example
nix
inputs.neovim-nightly-overlay.packages.${pkgs.stdenv.system}.default

vimlFiles

VimL config files to load at startup

Type
plaintext
list of path in the Nix store
Default
nix
[ ]
Example
nix
[
  (pkgs.writeText "init.vim" ''
    echomsg 'hello world'
  '')
]

wrapperArgs

A list of arguments to be passed to makeWrapper

Type
plaintext
list of string
Default
nix
[ ]
Example
nix
[
  "--set-default"
  "FZF_DEFAULT_OPTS"
  "--layout=reverse --inline-info"
]

Plugins Configuration

plugins

neovim plugins.

Type
plaintext
submodule
Default
nix
{ }
Example
nix
{
  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

      # To pass a directory
      # ('plugins.dev.<name>' is preferred for directories)
      {
        name = "plugin";
        src = ./plugin;
      }


      # Custom plugin example
      {
        # "pname" and "version"
        # or "name" is required
        pname = "customPlugin";
        version = "1";

        name = "customPlugin-1";

        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 = [];
      }
    ];

    # List of plugins to not load automatically
    # (load with packadd or a lazy loading plugin )
    opt = [
      pkgs.vimPlugins.oil-nvim
    ];
  };
}

plugins.dev

Plugins for use with devMode. You most likely want to put your config here. (automatically loaded)

Type
plaintext
attribute set of (submodule)
Default
nix
{ }
Example
nix
{
  myconfig = {
    pure = ./nvim;
    impure = "/home/user/nix-config/nvim";
  };
}

plugins.dev.<name>.impure

The impure absolute paths to the nvim plugin.

Type
plaintext
absolute path
Example
nix
/home/user/nix-config/nvim

plugins.dev.<name>.pure

The pure path to the nvim plugin.

Type
plaintext
attribute set of anything
Example
nix
./nvim

plugins.opt

Plugins to place in /opt (not automatically loaded)

Type
plaintext
list of (attribute set of anything)
Default
nix
[ ]
Example
nix
[ pkgs.vimPlugins.oil-nvim ]

plugins.start

Plugins to place in /start (automatically loaded)

Type
plaintext
list of (attribute set of anything)
Default
nix
[ ]
Example
nix
[ pkgs.vimPlugins.lz-n ]

Provider Configuration

providers.nodeJs.enable

Whether to enable and configure the Node.js provider.

Type
plaintext
boolean
Default
nix
false
Example
nix
true

providers.nodeJs.neovimClientPackage

The neovim-node-client package to use.

Type
plaintext
package
Default
nix
pkgs.neovim-node-client
Example
nix
pkgs.neovim-node-client

providers.nodeJs.package

The Node.js package to use.

Type
plaintext
package
Default
nix
pkgs.nodejs
Example
nix
pkgs.nodejs_23

providers.perl.enable

Whether to enable and configure the perl provider.

Type
plaintext
boolean
Default
nix
false
Example
nix
true

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.

Type
plaintext
function that evaluates to a(n) list of package
Default
nix
p: [
  p.NeovimExt
  p.Appcpanminus
]
Example
nix
p: [
  p.NeovimExt
  p.Appcpanminus
]

providers.perl.package

The perl package to use.

Type
plaintext
package
Default
nix
pkgs.perl
Example
nix
pkgs.perl

providers.python3.enable

Whether to enable and configure the python3 provider.

Type
plaintext
boolean
Default
nix
false
Example
nix
true

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.

Type
plaintext
function that evaluates to a(n) list of package
Default
nix
p: [ ppynvim ]
Example
nix
py: [
  py.pynvim
  py.pybtex
]

providers.python3.package

The python3 package to use.

Type
plaintext
package
Default
nix
pkgs.python3
Example
nix
pkgs.python39

providers.ruby.enable

Whether to enable and configure the ruby provider.

Type
plaintext
boolean
Default
nix
false
Example
nix
true

providers.ruby.env

The ruby bundlerEnv to use.

Type
plaintext
package
Default
nix
pkgs.bundlerEnv {
  name = "neovim-ruby-env";
  gemdir = ../ruby_provider;
  postBuild = '''
    rm $out/bin/{bundle,bundler}
  ''';
}
Example
nix
pkgs.bundlerEnv {
  name = "neovim-ruby-env";
  gemdir = ../ruby_provider;
}

providers.ruby.package

The ruby package to use.

Type
plaintext
package
Default
nix
programs.mnw.providers.ruby.env.ruby
Example
nix
pkgs.ruby