nvf/modules/wrapper/lazy/lazy.nix

30 lines
757 B
Nix
Raw Normal View History

2024-06-25 15:16:49 +00:00
{lib, ...}: let
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) enum listOf;
inherit (lib.nvim.types) lznPluginType;
2024-06-25 15:16:49 +00:00
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";
};
2024-07-09 22:28:10 +00:00
plugins = mkOption {
default = [];
type = listOf lznPluginType;
2024-07-09 22:28:10 +00:00
description = "list of plugins to lazy load";
example = ''
[
{
2024-07-09 22:28:10 +00:00
package = "toggleterm-nvim";
2024-07-10 10:39:53 +00:00
after = lib.generators.mkLuaInline "function() require('toggleterm').setup{} end";
2024-07-09 22:28:10 +00:00
cmd = ["ToggleTerm"];
}
]
2024-07-09 22:28:10 +00:00
'';
};
2024-06-25 15:16:49 +00:00
};
}