-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(nvim): add telescope-undo plugin
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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
} |