Skip to content

Commit

Permalink
feat(nvim): add telescope-undo plugin
Browse files Browse the repository at this point in the history
This commit adds the telescope-undo plugin to the telescope plugin. It
uses <leader>cu to open the telescope undo history.
  • Loading branch information
Deniz Gökçin committed Jan 17, 2024
1 parent 88f1efd commit 06836f5
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions nvim/lua/plugins/telesope-undo.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
return {
"debugloop/telescope-undo.nvim",
dependencies = { -- note how they're inverted to above example
{
"nvim-telescope/telescope.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
},
},
keys = {
{ -- lazy style key map
"<leader>cu",
"<cmd>Telescope undo<cr>",
desc = "Undo history",
},
},
opts = {
-- don't use `defaults = { }` here, do this in the main telescope spec
extensions = {
undo = {
-- telescope-undo.nvim config, see below
},
-- no other extensions here, they can have their own spec too
},
},
config = function(_, opts)
-- Calling telescope's setup from multiple specs does not hurt, it will happily merge the
-- configs for us. We won't use data, as everything is in it's own namespace (telescope
-- defaults, as well as each extension).
require("telescope").setup(opts)
require("telescope").load_extension("undo")
end,
}

0 comments on commit 06836f5

Please sign in to comment.