add lazy module skeleton

This commit is contained in:
Pei Yang Ching 2024-06-25 17:16:49 +02:00 committed by Pei Yang Ching
parent ecf1ae31f2
commit a3379d8fe8
4 changed files with 36 additions and 0 deletions

View file

@ -50,6 +50,7 @@
wrapper = map (p: ./wrapper + "/${p}") [
"build"
"rc"
"lazy"
"warnings"
];

View 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 =
};
}

View file

@ -0,0 +1,6 @@
_: {
imports = [
./lazy.nix
./config.nix
];
}

View 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 {};
};
}