2024-06-25 15:16:49 +00:00
|
|
|
{lib, ...}: let
|
|
|
|
inherit (lib.options) mkOption mkEnableOption;
|
|
|
|
inherit (lib.types) enum;
|
2024-07-09 22:28:10 +00:00
|
|
|
inherit (lib.nvim.types) lznPluginTableType;
|
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 = lznPluginTableType;
|
|
|
|
description = "list of plugins to lazy load";
|
|
|
|
example = ''
|
|
|
|
{
|
|
|
|
toggleterm-nvim = {
|
|
|
|
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-06-25 15:16:49 +00:00
|
|
|
};
|
|
|
|
}
|