1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-18 15:59:48 +01:00
home-manager/modules/programs/neovim.nix
Matthieu Coudron 61a869a1f5
neovim: add module
This is a basic module that allows to configure different Neovim
providers than the system ones. Note, it does not generate any
`init.vim`.
2017-11-12 23:57:14 +01:00

74 lines
1.6 KiB
Nix

{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.neovim;
in
{
options = {
programs.neovim = {
enable = mkEnableOption "Neovim";
withPython = mkOption {
type = types.bool;
default = true;
description = ''
Enable Python 2 provider. Set to <literal>true</literal> to
use Python 2 plugins.
'';
};
extraPythonPackages = mkOption {
type = types.listOf types.package;
default = [ ];
example = literalExample "with pkgs.python2Packages; [ pandas jedi ]";
description = ''
List here Python 2 packages required for your plugins to
work.
'';
};
withRuby = mkOption {
type = types.nullOr types.bool;
default = true;
description = ''
Enable ruby provider.
'';
};
withPython3 = mkOption {
type = types.bool;
default = true;
description = ''
Enable Python 3 provider. Set to <literal>true</literal> to
use Python 3 plugins.
'';
};
extraPython3Packages = mkOption {
type = types.listOf types.package;
default = [ ];
example = literalExample
"with pkgs.python3Packages; [ python-language-server ]";
description = ''
List here Python 3 packages required for your plugins to work.
'';
};
};
};
config = mkIf cfg.enable {
home.packages = [
(pkgs.neovim.override {
inherit (cfg)
extraPython3Packages withPython3
extraPythonPackages withPython
withRuby;
})
];
};
}