undotree: package option

This commit is contained in:
Alexander Nortung 2023-01-17 23:56:16 +01:00
parent c7c42b168a
commit 8e2ec493a7

View file

@ -9,6 +9,12 @@ in
plugins.undotree = {
enable = mkEnableOption "Enable undotree";
package = mkOption {
type = types.package;
default = pkgs.vimPlugins.undotree;
description = "Plugin to use for undotree";
};
windowLayout = mkOption {
type = types.nullOr types.int;
default = null;
@ -108,7 +114,7 @@ in
};
config = mkIf cfg.enable {
extraPlugins = [ pkgs.vimPlugins.undotree ];
extraPlugins = [ cfg.package ];
globals = {
undotree_WindowLayout = mkIf (cfg.windowLayout != null) cfg.windowLayout;