neovim-flake/modules/wrapper/lazy/lazy.nix

30 lines
772 B
Nix
Raw Normal View History

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