mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-22 21:30:51 +00:00
add lazy module skeleton
This commit is contained in:
parent
ad8ce463f1
commit
b409800b2f
4 changed files with 36 additions and 0 deletions
|
@ -50,6 +50,7 @@
|
|||
wrapper = map (p: ./wrapper + "/${p}") [
|
||||
"build"
|
||||
"rc"
|
||||
"lazy"
|
||||
"warnings"
|
||||
];
|
||||
|
||||
|
|
14
modules/wrapper/lazy/config.nix
Normal file
14
modules/wrapper/lazy/config.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
cfg = config.vim.lazy;
|
||||
in {
|
||||
config.vim = mkIf cfg.enable {
|
||||
startPlugins = ["lz-n"];
|
||||
|
||||
# optPlugins =
|
||||
};
|
||||
}
|
6
modules/wrapper/lazy/default.nix
Normal file
6
modules/wrapper/lazy/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./lazy.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
15
modules/wrapper/lazy/lazy.nix
Normal file
15
modules/wrapper/lazy/lazy.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.types) enum;
|
||||
in {
|
||||
options.vim.lazy = {
|
||||
enable = mkEnableOption "plugin lazy-loading" // {default = true;};
|
||||
loader = mkOption {
|
||||
description = "Lazy loader to use";
|
||||
type = enum ["lz.n"];
|
||||
default = "lz.n";
|
||||
};
|
||||
|
||||
# plugins = mkOption {};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue