plugins/telescope: refactor extensions

This commit is contained in:
Gaetan Lepage 2024-03-24 17:42:40 +01:00 committed by Gaétan Lepage
parent 3c0951ebc8
commit b38f24f348
23 changed files with 1136 additions and 601 deletions

View file

@ -13,22 +13,24 @@
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";
settings = {
use_delta = true;
use_custom_command = ["bash" "-c" "echo '$DIFF' | delta"];
side_by_side = true;
diff_context_lines = 8;
entry_format = "state #$ID";
time_format = "!%Y-%m-%dT%TZ";
mappings = {
i = {
"<cr>" = "require('telescope-undo.actions').yank_additions";
"<s-cr>" = "require('telescope-undo.actions').yank_deletions";
"<c-cr>" = "require('telescope-undo.actions').restore";
};
n = {
"y" = "require('telescope-undo.actions').yank_additions";
"Y" = "require('telescope-undo.actions').yank_deletions";
"u" = "require('telescope-undo.actions').restore";
};
};
};
};