Skip to content

Commit

Permalink
add unimpaired, telescope-undo, blamer
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Suraci <[email protected]>
  • Loading branch information
vito committed Sep 10, 2024
1 parent 7c4c492 commit dd233b9
Showing 1 changed file with 31 additions and 6 deletions.
37 changes: 31 additions & 6 deletions lua/custom/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ return {
'tpope/vim-abolish', -- :%Subvert etc.
'tpope/vim-obsession', -- Session.vim
'tpope/vim-eunuch', -- :Rename etc.
'tpope/vim-unimpaired', -- [q ]q etc.
{
-- existential crisis, but FASTER
'zbirenbaum/copilot.lua',
Expand Down Expand Up @@ -121,13 +122,36 @@ return {
end,
},
{
-- undo tree
'jiaoshijie/undotree',
dependencies = 'nvim-lua/plenary.nvim',
config = true,
keys = { -- load the plugin only when using it's keybinding:
{ '<leader>u', "<cmd>lua require('undotree').toggle()<cr>" },
'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>u',
'<cmd>Telescope undo<cr>',
desc = '[U]ndo 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,
},
{
'ray-x/go.nvim',
Expand Down Expand Up @@ -160,4 +184,5 @@ return {
}
end,
},
'APZelos/blamer.nvim',
}

0 comments on commit dd233b9

Please sign in to comment.