mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-10 17:24:32 +02:00
refactor undo to newer style (#677)
Co-authored-by: Haseeb Majid <haseeb.majid@imaginecurve.com>
This commit is contained in:
parent
8fb5fc43fe
commit
77a3f3c298
1 changed files with 22 additions and 43 deletions
|
@ -13,54 +13,33 @@ in {
|
||||||
|
|
||||||
package = helpers.mkPackageOption "telescope extension undo" pkgs.vimPlugins.telescope-undo-nvim;
|
package = helpers.mkPackageOption "telescope extension undo" pkgs.vimPlugins.telescope-undo-nvim;
|
||||||
|
|
||||||
useDelta = mkOption {
|
useDelta = helpers.defaultNullOpts.mkBool true ''
|
||||||
type = types.nullOr types.bool;
|
|
||||||
description = ''
|
|
||||||
When set to true, [delta](https://github.com/dandavison/delta) is used for fancy diffs in the preview section.
|
When set to true, [delta](https://github.com/dandavison/delta) is used for fancy diffs in the preview section.
|
||||||
If set to false, `telescope-undo` will not use `delta` even when available and fall back to a plain diff with
|
If set to false, `telescope-undo` will not use `delta` even when available and fall back to a plain diff with
|
||||||
treesitter highlights.
|
treesitter highlights.
|
||||||
'';
|
'';
|
||||||
default = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
useCustomCommand = mkOption {
|
useCustomCommand = helpers.mkNullOrOption (with types; listOf str) ''
|
||||||
type = types.nullOr (types.listOf types.str);
|
|
||||||
description = ''
|
|
||||||
should be in this format: [ "bash" "-c" "echo '$DIFF' | delta" ]
|
should be in this format: [ "bash" "-c" "echo '$DIFF' | delta" ]
|
||||||
'';
|
'';
|
||||||
default = null;
|
|
||||||
};
|
|
||||||
|
|
||||||
sideBySide = mkOption {
|
sideBySide = helpers.defaultNullOpts.mkBool false ''
|
||||||
type = types.nullOr types.bool;
|
|
||||||
description = ''
|
|
||||||
If set to true tells `delta` to render diffs side-by-side. Thus, requires `delta` to be
|
If set to true tells `delta` to render diffs side-by-side. Thus, requires `delta` to be
|
||||||
used. Be aware that `delta` always uses its own configuration, so it might be that you're getting
|
used. Be aware that `delta` always uses its own configuration, so it might be that you're getting
|
||||||
the side-by-side view even if this is set to false.
|
the side-by-side view even if this is set to false.
|
||||||
'';
|
'';
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
diffContextLines = mkOption {
|
diffContextLines = helpers.defaultNullOpts.mkNullable (with types; either ints.unsigned str) "vim.o.scrolloff" ''
|
||||||
type = with types;
|
Defaults to the scrolloff
|
||||||
either ints.unsigned str;
|
'';
|
||||||
description = ''Defaults to the scrolloff'';
|
|
||||||
default = "vim.o.scrolloff";
|
|
||||||
};
|
|
||||||
|
|
||||||
entryFormat = mkOption {
|
entryFormat = helpers.defaultNullOpts.mkStr "state #$ID, $STAT, $TIME" ''
|
||||||
type = types.nullOr types.str;
|
The format to show on telescope for the different versions of the file.
|
||||||
description = ''The format to show on telescope for the different versions of the file.'';
|
'';
|
||||||
default = "state #$ID, $STAT, $TIME";
|
|
||||||
};
|
|
||||||
|
|
||||||
timeFormat = mkOption {
|
timeFormat = helpers.defaultNullOpts.mkStr "" ''
|
||||||
type = types.nullOr types.str;
|
|
||||||
description = ''
|
|
||||||
Can be set to a [Lua date format string](https://www.lua.org/pil/22.1.html).
|
Can be set to a [Lua date format string](https://www.lua.org/pil/22.1.html).
|
||||||
'';
|
'';
|
||||||
default = "";
|
|
||||||
};
|
|
||||||
|
|
||||||
mappings = {
|
mappings = {
|
||||||
i =
|
i =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue