add harpoon

This commit is contained in:
Andrew 2025-03-14 14:07:14 -07:00
parent 848a2d64d8
commit fa30d68850
1 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,37 @@
return {
'ThePrimeagen/harpoon',
branch = 'harpoon2',
dependencies = { 'nvim-lua/plenary.nvim' },
init = function()
local harpoon = require 'harpoon'
harpoon:setup()
vim.keymap.set('n', '<leader>a', function()
harpoon:list():add()
end)
vim.keymap.set('n', '<C-e>', function()
harpoon.ui:toggle_quick_menu(harpoon:list())
end)
vim.keymap.set('n', '<C-h>', function()
harpoon:list():select(1)
end)
vim.keymap.set('n', '<C-t>', function()
harpoon:list():select(2)
end)
vim.keymap.set('n', '<C-n>', function()
harpoon:list():select(3)
end)
vim.keymap.set('n', '<C-s>', function()
harpoon:list():select(4)
end)
-- Toggle previous & next buffers stored within Harpoon list
vim.keymap.set('n', '<C-S-P>', function()
harpoon:list():prev()
end)
vim.keymap.set('n', '<C-S-N>', function()
harpoon:list():next()
end)
end,
}