neovim: add module
This is a basic module that allows to configure different neovim providers than the system ones. It doesn't generate any init.vim.
This commit is contained in:
parent
2b2e20da24
commit
4c07b552fa
|
@ -35,6 +35,7 @@ let
|
|||
./programs/info.nix
|
||||
./programs/lesspipe.nix
|
||||
./programs/man.nix
|
||||
./programs/neovim.nix
|
||||
./programs/rofi.nix
|
||||
./programs/ssh.nix
|
||||
./programs/termite.nix
|
||||
|
|
|
@ -442,6 +442,12 @@ in
|
|||
December 6, 2017.
|
||||
'';
|
||||
}
|
||||
{
|
||||
time = "2017-11-12T00:18:59+00:00";
|
||||
message = ''
|
||||
A new program module is available: 'program.neovim'.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
70
modules/programs/neovim.nix
Normal file
70
modules/programs/neovim.nix
Normal file
|
@ -0,0 +1,70 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.programs.neovim;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
programs.neovim = {
|
||||
enable = mkEnableOption "Neovim";
|
||||
|
||||
withPython = mkOption {
|
||||
type = types.nullOr types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Enable python 2 provider. Set to true to use python 2 plugins.
|
||||
'';
|
||||
};
|
||||
|
||||
extraPythonPackages = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = [ ];
|
||||
example = literalExample ''
|
||||
[ 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.nullOr types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Enable python 3 provider. Set to true to use python 3 plugins.
|
||||
'';
|
||||
};
|
||||
|
||||
extraPython3Packages = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = [ ];
|
||||
example = ''
|
||||
[ python-language-server ]
|
||||
'';
|
||||
description = ''
|
||||
List here python 3 packages required for your plugins to work.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config =
|
||||
let
|
||||
neovim = pkgs.neovim.override {
|
||||
inherit (cfg) extraPython3Packages withPython3 extraPythonPackages withPython withRuby;
|
||||
};
|
||||
in mkIf cfg.enable rec {
|
||||
home.packages = [ neovim ];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in a new issue