adds harpoon plugin
This commit is contained in:
parent
b95c8cf161
commit
5af5240814
1 changed files with 26 additions and 0 deletions
26
lua/plugin/harpoon.lua
Normal file
26
lua/plugin/harpoon.lua
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"ThePrimeagen/harpoon",
|
||||||
|
branch = "harpoon2",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
lazy = true,
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local harpoon = require("harpoon")
|
||||||
|
harpoon:setup()
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>a", function() harpoon:list():append() end)
|
||||||
|
vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>n", function() harpoon:list():select(1) end)
|
||||||
|
vim.keymap.set("n", "<leader>e", function() harpoon:list():select(2) end)
|
||||||
|
vim.keymap.set("n", "<leader>i", function() harpoon:list():select(3) end)
|
||||||
|
vim.keymap.set("n", "<leader>o", function() harpoon:list():select(4) end)
|
||||||
|
|
||||||
|
-- Toggle previous & next buffers stored within Harpoon list
|
||||||
|
vim.keymap.set("n", "<C-P>", function() harpoon:list():prev() end)
|
||||||
|
vim.keymap.set("n", "<C-N>", function() harpoon:list():next() end)
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue