diff --git a/modules/plugins/utility/undotree/config.nix b/modules/plugins/utility/undotree/config.nix index d954d49f..06343e6a 100644 --- a/modules/plugins/utility/undotree/config.nix +++ b/modules/plugins/utility/undotree/config.nix @@ -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" + ]; + }; }; }