2022-09-18 11:19:23 +01:00
|
|
|
{
|
2023-02-20 11:42:13 +01:00
|
|
|
lib,
|
2023-11-06 15:04:08 +01:00
|
|
|
pkgs,
|
2023-02-20 11:42:13 +01:00
|
|
|
...
|
2024-01-08 14:42:01 +01:00
|
|
|
} @ args:
|
|
|
|
with lib;
|
2024-01-24 22:49:29 +01:00
|
|
|
with (import ../helpers.nix {inherit lib;}).vim-plugin;
|
2024-01-08 14:42:01 +01:00
|
|
|
mkPlugin args {
|
|
|
|
name = "undotree";
|
|
|
|
package = pkgs.vimPlugins.undotree;
|
|
|
|
globalPrefix = "undotree_";
|
|
|
|
|
|
|
|
options = {
|
|
|
|
windowLayout = mkDefaultOpt {
|
|
|
|
type = types.int;
|
|
|
|
description = ''
|
|
|
|
Window layout for undotree.
|
|
|
|
Check https://github.com/mbbill/undotree/blob/master/plugin/undotree.vim#L29 for reference
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
shortIndicators = mkDefaultOpt {
|
2021-02-10 15:09:31 +00:00
|
|
|
type = types.bool;
|
2024-01-08 14:42:01 +01:00
|
|
|
description = ''
|
|
|
|
E.g. use 'd' instead of 'days'
|
|
|
|
|
|
|
|
Default: `false`
|
|
|
|
'';
|
2021-02-10 15:09:31 +00:00
|
|
|
};
|
|
|
|
|
2024-01-08 14:42:01 +01:00
|
|
|
windowWidth = mkDefaultOpt {
|
|
|
|
type = types.int;
|
2021-02-10 15:09:31 +00:00
|
|
|
description = "Undotree window width";
|
|
|
|
};
|
|
|
|
|
2024-01-08 14:42:01 +01:00
|
|
|
diffHeight = mkDefaultOpt {
|
|
|
|
type = types.int;
|
2021-02-10 15:09:31 +00:00
|
|
|
description = "Undotree diff panel height";
|
|
|
|
};
|
|
|
|
|
2024-01-08 14:42:01 +01:00
|
|
|
autoOpenDiff = mkDefaultOpt {
|
2021-02-10 15:09:31 +00:00
|
|
|
type = types.bool;
|
2024-01-08 14:42:01 +01:00
|
|
|
description = ''
|
|
|
|
Auto open diff window
|
|
|
|
|
|
|
|
Default: `true`
|
|
|
|
'';
|
2021-02-10 15:09:31 +00:00
|
|
|
};
|
|
|
|
|
2024-01-08 14:42:01 +01:00
|
|
|
focusOnToggle = mkDefaultOpt {
|
2021-02-10 15:09:31 +00:00
|
|
|
type = types.bool;
|
2024-01-08 14:42:01 +01:00
|
|
|
description = ''
|
|
|
|
Focus undotree after being opened
|
|
|
|
|
|
|
|
Default: `false`
|
|
|
|
'';
|
2021-02-10 15:09:31 +00:00
|
|
|
};
|
|
|
|
|
2024-01-08 14:42:01 +01:00
|
|
|
treeNodeShape = mkDefaultOpt {
|
|
|
|
type = types.str;
|
2021-02-10 15:09:31 +00:00
|
|
|
description = "Tree node shape";
|
|
|
|
};
|
|
|
|
|
2024-01-08 14:42:01 +01:00
|
|
|
diffCommand = mkDefaultOpt {
|
|
|
|
type = types.str;
|
2021-02-10 15:09:31 +00:00
|
|
|
description = "Diff command";
|
|
|
|
};
|
|
|
|
|
2024-01-08 14:42:01 +01:00
|
|
|
relativeTimestamp = mkDefaultOpt {
|
2021-02-10 15:09:31 +00:00
|
|
|
type = types.bool;
|
2024-01-08 14:42:01 +01:00
|
|
|
description = ''
|
|
|
|
Use a relative timestamp.
|
|
|
|
|
|
|
|
Default: `true`
|
|
|
|
'';
|
2021-02-10 15:09:31 +00:00
|
|
|
};
|
|
|
|
|
2024-01-08 14:42:01 +01:00
|
|
|
highlightChangedText = mkDefaultOpt {
|
2021-02-10 15:09:31 +00:00
|
|
|
type = types.bool;
|
2024-01-08 14:42:01 +01:00
|
|
|
description = ''
|
|
|
|
Highlight changed text
|
|
|
|
|
|
|
|
Default: `true`
|
|
|
|
'';
|
2021-02-10 15:09:31 +00:00
|
|
|
};
|
|
|
|
|
2024-01-08 14:42:01 +01:00
|
|
|
highlightChangesWithSign = mkDefaultOpt {
|
2021-02-10 15:09:31 +00:00
|
|
|
type = types.bool;
|
2024-01-08 14:42:01 +01:00
|
|
|
description = ''
|
|
|
|
Highlight changes with a sign in the gutter
|
|
|
|
|
|
|
|
Default: `true`
|
|
|
|
'';
|
2021-02-10 15:09:31 +00:00
|
|
|
};
|
|
|
|
|
2024-01-08 14:42:01 +01:00
|
|
|
highlightSyntaxAdd = mkDefaultOpt {
|
|
|
|
type = types.str;
|
2021-02-10 15:09:31 +00:00
|
|
|
description = "Added lines highlight group";
|
|
|
|
};
|
|
|
|
|
2024-01-08 14:42:01 +01:00
|
|
|
highlightSyntaxChange = mkDefaultOpt {
|
|
|
|
type = types.str;
|
2021-02-10 15:09:31 +00:00
|
|
|
description = "Changed lines highlight group";
|
|
|
|
};
|
|
|
|
|
2024-01-08 14:42:01 +01:00
|
|
|
highlightSyntaxDel = mkDefaultOpt {
|
|
|
|
type = types.str;
|
2021-02-10 15:09:31 +00:00
|
|
|
description = "Deleted lines highlight group";
|
|
|
|
};
|
|
|
|
|
2024-01-08 14:42:01 +01:00
|
|
|
showHelpLine = mkDefaultOpt {
|
2021-02-10 15:09:31 +00:00
|
|
|
type = types.bool;
|
2024-01-08 14:42:01 +01:00
|
|
|
description = ''
|
|
|
|
Show help line.
|
|
|
|
|
|
|
|
Default: `true`
|
|
|
|
'';
|
2021-02-10 15:09:31 +00:00
|
|
|
};
|
|
|
|
|
2024-01-08 14:42:01 +01:00
|
|
|
showCursorLine = mkDefaultOpt {
|
2021-02-10 15:09:31 +00:00
|
|
|
type = types.bool;
|
2024-01-08 14:42:01 +01:00
|
|
|
description = ''
|
|
|
|
Show cursor line
|
|
|
|
|
|
|
|
Default: `true`
|
|
|
|
'';
|
2021-02-10 15:09:31 +00:00
|
|
|
};
|
|
|
|
};
|
2024-01-08 14:42:01 +01:00
|
|
|
}
|