nvf/modules/wrapper/lazy/lazy.nix
2024-08-25 00:27:14 +02:00

30 lines
757 B
Nix

{lib, ...}: let
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) enum listOf;
inherit (lib.nvim.types) lznPluginType;
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 {
default = [];
type = listOf lznPluginType;
description = "list of plugins to lazy load";
example = ''
[
{
package = "toggleterm-nvim";
after = lib.generators.mkLuaInline "function() require('toggleterm').setup{} end";
cmd = ["ToggleTerm"];
}
]
'';
};
};
}