Add home/modules/nvim/config/lua/plugins/harpoon.lua
This commit is contained in:
parent
5c28af23b4
commit
49a5cd23d5
1 changed files with 36 additions and 0 deletions
36
home/modules/nvim/config/lua/plugins/harpoon.lua
Normal file
36
home/modules/nvim/config/lua/plugins/harpoon.lua
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
return {
|
||||||
|
"ThePrimeagen/harpoon",
|
||||||
|
branch = "harpoon2",
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
config = function()
|
||||||
|
local harpoon = require("harpoon")
|
||||||
|
|
||||||
|
harpoon:setup()
|
||||||
|
|
||||||
|
-- Keybindings
|
||||||
|
vim.keymap.set("n", "<leader>hs", function()
|
||||||
|
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||||
|
end)
|
||||||
|
vim.keymap.set("n", "<leader>ha", function()
|
||||||
|
harpoon:list():add()
|
||||||
|
end)
|
||||||
|
vim.keymap.set("n", "<leader>hy", function()
|
||||||
|
harpoon:list():select(1)
|
||||||
|
end)
|
||||||
|
vim.keymap.set("n", "<leader>hu", function()
|
||||||
|
harpoon:list():select(2)
|
||||||
|
end)
|
||||||
|
vim.keymap.set("n", "<leader>hi", function()
|
||||||
|
harpoon:list():select(3)
|
||||||
|
end)
|
||||||
|
vim.keymap.set("n", "<leader>ho", function()
|
||||||
|
harpoon:list():select(4)
|
||||||
|
end)
|
||||||
|
vim.keymap.set("n", "<leader>hp", function()
|
||||||
|
harpoon:list():prev()
|
||||||
|
end)
|
||||||
|
vim.keymap.set("n", "<leader>hn", function()
|
||||||
|
harpoon:list():next()
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue