mirror of
https://github.com/tomru/nvim.git
synced 2026-03-03 14:37:15 +01:00
wip
This commit is contained in:
38
lua/plugins/harpoon.lua
Normal file
38
lua/plugins/harpoon.lua
Normal file
@@ -0,0 +1,38 @@
|
||||
return {
|
||||
'ThePrimeagen/harpoon',
|
||||
branch = 'harpoon2',
|
||||
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 = '[a]dd' })
|
||||
vim.keymap.set('n', '<leader>hh', function()
|
||||
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||
end, { desc = '[q]uick menu' })
|
||||
|
||||
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,
|
||||
}
|
||||
Reference in New Issue
Block a user