plugins/telescope.extensions.undo: init + (#654)

* new plugin

* add content

* add content

* Update plugins/telescope/undo.nix

Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>

* Update plugins/telescope/undo.nix

Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>

* add test

* Update plugins/telescope/undo.nix

Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>

* fix per pr comments

* fix per pr comments

* fix per pr comments

---------

Co-authored-by: Haseeb Majid <haseeb.majid@imaginecurve.com>
Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>
This commit is contained in:
Haseeb Majid 2023-10-25 22:08:23 +01:00 committed by GitHub
parent 0c5dcb56d1
commit 520a59668d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 172 additions and 0 deletions

View file

@ -0,0 +1,34 @@
{
empty = {
plugins.telescope.enable = true;
};
example = {
plugins.telescope = {
enable = true;
extensions.undo = {
enable = true;
useDelta = true;
useCustomCommand = ["bash" "-c" "echo '$DIFF' | delta"];
sideBySide = true;
diffContextLines = 8;
entryFormat = "state #$ID";
timeFormat = "!%Y-%m-%dT%TZ";
mappings = {
i = {
"<cr>" = "yank_additions";
"<s-cr>" = "yank_deletions";
"<c-cr>" = "restore";
};
n = {
"y" = "yank_additions";
"Y" = "yank_deletions";
"u" = "restore";
};
};
};
};
};
}