From 2997719f33749ced69c5524a8205e088f515b594 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Tue, 3 Jan 2023 10:09:26 -0600 Subject: [PATCH] feat(nvim): add telescope undo --- .../primary/config/lua/plugins/configs/telescope-nvim.lua | 8 ++++++++ .../primary/config/lua/plugins/mappings.lua | 1 + .../primary/config/lua/plugins/plugins.lua | 1 + 3 files changed, 10 insertions(+) diff --git a/dots/.nvim-environments/primary/config/lua/plugins/configs/telescope-nvim.lua b/dots/.nvim-environments/primary/config/lua/plugins/configs/telescope-nvim.lua index a1899247..4f41e1ea 100755 --- a/dots/.nvim-environments/primary/config/lua/plugins/configs/telescope-nvim.lua +++ b/dots/.nvim-environments/primary/config/lua/plugins/configs/telescope-nvim.lua @@ -78,6 +78,13 @@ telescope.setup({ ["ui-select"] = { require("telescope.themes").get_dropdown(), }, + undo = { + side_by_side = true, + layout_strategy = "vertical", + layout_config = { + preview_height = 0.8, + }, + }, }, }) @@ -88,3 +95,4 @@ telescope.load_extension("notify") telescope.load_extension("fzf") telescope.load_extension("ui-select") telescope.load_extension("smart_history") +telescope.load_extension("undo") diff --git a/dots/.nvim-environments/primary/config/lua/plugins/mappings.lua b/dots/.nvim-environments/primary/config/lua/plugins/mappings.lua index 0de07804..d25b050d 100755 --- a/dots/.nvim-environments/primary/config/lua/plugins/mappings.lua +++ b/dots/.nvim-environments/primary/config/lua/plugins/mappings.lua @@ -39,6 +39,7 @@ vim.keymap.set("n", "tl", ":Telescope resume", { silent = true, desc vim.keymap.set("n", "tT", ":TodoTelescope", { silent = true, desc = "Telescope: Todo Items" }) vim.keymap.set("n", "tk", ":Telescope keymaps", { silent = true, desc = "Telescope: Keymaps" }) vim.keymap.set("n", "tc", ":Telescope commands", { silent = true, desc = "Telescope: Commands" }) +vim.keymap.set("n", "tu", ":Telescope undo", { silent = true, desc = "Telescope: Undo History" }) -- Lsp Mappings diff --git a/dots/.nvim-environments/primary/config/lua/plugins/plugins.lua b/dots/.nvim-environments/primary/config/lua/plugins/plugins.lua index f156b2f7..484ac2eb 100755 --- a/dots/.nvim-environments/primary/config/lua/plugins/plugins.lua +++ b/dots/.nvim-environments/primary/config/lua/plugins/plugins.lua @@ -187,6 +187,7 @@ lazy.setup({ "nvim-telescope/telescope-file-browser.nvim", "artart222/telescope_find_directories", "nvim-telescope/telescope-ui-select.nvim", + "debugloop/telescope-undo.nvim", { "nvim-telescope/telescope-smart-history.nvim", dependencies = "tami5/sqlite.lua" }, { "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, },