feat(harpoon): add harpoon2 plugin with keymaps and plenary dependency
This commit is contained in:
3 files changed
+299
-331
No files matched your search
+24
-30
@@ -4,36 +4,30 @@ return {
|
||||
{
|
||||
'ThePrimeagen/harpoon',
|
||||
branch = 'harpoon2',
|
||||
keys = {
|
||||
{
|
||||
'<A-1>',
|
||||
function()
|
||||
require('harpoon'):list():select(1)
|
||||
end,
|
||||
desc = 'buffer j',
|
||||
},
|
||||
{
|
||||
'<A-2>',
|
||||
function()
|
||||
require('harpoon'):list():select(2)
|
||||
end,
|
||||
desc = 'buffer k',
|
||||
},
|
||||
{
|
||||
'<A-3>',
|
||||
function()
|
||||
require('harpoon'):list():select(3)
|
||||
end,
|
||||
desc = 'buffer l',
|
||||
},
|
||||
{
|
||||
'<A-4>',
|
||||
function()
|
||||
require('harpoon'):list():select(4)
|
||||
end,
|
||||
desc = 'buffer ;',
|
||||
},
|
||||
},
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
config = function()
|
||||
local harpoon = require('harpoon')
|
||||
harpoon:setup()
|
||||
|
||||
vim.keymap.set('n', '<leader>ha', function()
|
||||
harpoon:list():add()
|
||||
end, { desc = 'Harpoon add file' })
|
||||
vim.keymap.set('n', '<leader>hl', function()
|
||||
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||
end, { desc = 'Harpoon quick menu' })
|
||||
vim.keymap.set('n', '<A-1>', function()
|
||||
harpoon:list():select(1)
|
||||
end)
|
||||
vim.keymap.set('n', '<A-2>', function()
|
||||
harpoon:list():select(2)
|
||||
end)
|
||||
vim.keymap.set('n', '<A-3>', function()
|
||||
harpoon:list():select(3)
|
||||
end)
|
||||
vim.keymap.set('n', '<A-4>', function()
|
||||
harpoon:list():select(4)
|
||||
end)
|
||||
end,
|
||||
},
|
||||
|
||||
-- better escape
|
||||
|
||||
Reference in new issue
Block a user