utility/undotree: use enable option

This commit is contained in:
Joshua Manchester 2025-07-24 15:57:06 +01:00
commit afe7559c8e
No known key found for this signature in database

View file

@ -1,12 +1,22 @@
{
vim.lazy.plugins.undotree = {
package = "undotree";
cmd = [
"UndotreeToggle"
"UndotreeShow"
"UndotreeHide"
"UndotreePersistUndo"
"UndotreeFocus"
];
lib,
config,
...
}: let
inherit (lib.modules) mkIf;
cfg = config.vim.utility.undotree;
in {
config = mkIf cfg.enable {
vim.lazy.plugins.undotree = {
package = "undotree";
cmd = [
"UndotreeToggle"
"UndotreeShow"
"UndotreeHide"
"UndotreePersistUndo"
"UndotreeFocus"
];
};
};
}