From ff48cd4add7665aade058b3534474c9f0824f179 Mon Sep 17 00:00:00 2001 From: Baitinq <30861839+Baitinq@users.noreply.github.com> Date: Mon, 15 Apr 2024 09:37:30 +0200 Subject: Dotfiles: Nvim: Add telescope undo --- dotfiles/nvim/init.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'dotfiles') diff --git a/dotfiles/nvim/init.lua b/dotfiles/nvim/init.lua index 2734375..30c4119 100644 --- a/dotfiles/nvim/init.lua +++ b/dotfiles/nvim/init.lua @@ -343,6 +343,8 @@ require('lazy').setup({ }, { 'nvim-telescope/telescope-ui-select.nvim' }, + { "debugloop/telescope-undo.nvim" }, + -- Useful for getting pretty icons, but requires a Nerd Font. { 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font }, }, @@ -394,6 +396,7 @@ require('lazy').setup({ -- Enable telescope extensions, if they are installed pcall(require('telescope').load_extension, 'fzf') pcall(require('telescope').load_extension, 'ui-select') + pcall(require("telescope").load_extension, "undo") -- See `:help telescope.builtin` local builtin = require 'telescope.builtin' @@ -409,6 +412,8 @@ require('lazy').setup({ vim.keymap.set('n', 's.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) vim.keymap.set('n', '', builtin.buffers, { desc = '[ ] Find existing buffers' }) + vim.keymap.set("n", "u", "Telescope undo", { desc = "[U]ndo Menu" }) + -- Slightly advanced example of overriding default behavior and theme vim.keymap.set('n', '/', function() -- You can pass additional configuration to telescope to change theme, layout, etc. -- cgit 1.4.1