Add vPlug option to modules.
This commit is contained in:
parent
bd20996cf1
commit
ca7310c274
5 changed files with 47 additions and 15 deletions
|
@ -2,6 +2,12 @@
|
|||
let
|
||||
mkOption = lib.mkOption;
|
||||
types = lib.types;
|
||||
vPlugFunctionType = types.mkOptionType {
|
||||
name = "vPlugFunction";
|
||||
description = "function taking vimPlugins and returning plugin or plugin list";
|
||||
check = builtins.isFunction;
|
||||
merge = lib.mergeOneOption;
|
||||
};
|
||||
keyBind = (
|
||||
{ ... }:
|
||||
{
|
||||
|
@ -44,6 +50,7 @@ let
|
|||
nullOr (oneOf [
|
||||
path
|
||||
package
|
||||
vPlugFunctionType
|
||||
]);
|
||||
default = null;
|
||||
description = ''A vim plugin package or a path pointing to a local plugin.'';
|
||||
|
@ -92,9 +99,12 @@ let
|
|||
type =
|
||||
with types;
|
||||
nullOr (
|
||||
listOf (oneOf [
|
||||
str
|
||||
package
|
||||
(oneOf [
|
||||
vPlugFunctionType
|
||||
(listOf (oneOf [
|
||||
str
|
||||
package
|
||||
]))
|
||||
])
|
||||
);
|
||||
default = null;
|
||||
|
@ -212,6 +222,11 @@ in
|
|||
default = pkgs.neovim-unwrapped;
|
||||
description = ''The neovim-unwrapped package to use.'';
|
||||
};
|
||||
vPlug = mkOption {
|
||||
type = with types; lazyAttrsOf anything;
|
||||
default = pkgs.vimPlugins;
|
||||
description = ''The vimPlugins attrs to use.'';
|
||||
};
|
||||
luaRcContent = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
|
|
|
@ -15,7 +15,7 @@ in
|
|||
_module.check = lib.mkDefault false;
|
||||
home.packages = [
|
||||
(wrapNeovimLazy cfg.package {
|
||||
inherit (cfg) luaRcContent lazyConfig lazyPlugins;
|
||||
inherit (cfg) luaRcContent lazyConfig lazyPlugins vPlug;
|
||||
})
|
||||
];
|
||||
};
|
||||
|
|
|
@ -15,7 +15,7 @@ in
|
|||
_module.check = lib.mkDefault false;
|
||||
environment.systemPackages = [
|
||||
(wrapNeovimLazy cfg.package {
|
||||
inherit (cfg) luaRcContent lazyConfig lazyPlugins;
|
||||
inherit (cfg) luaRcContent lazyConfig lazyPlugins vPlug;
|
||||
})
|
||||
];
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue