updated to harpoon2

This commit is contained in:
Tiago Sousa 2024-04-20 15:55:00 +01:00
parent 4c83d8f94b
commit d33e8b3729
Signed by: tiago
SSH key fingerprint: SHA256:rOmjD81ZIhKdCkFWS9UIKdBi4UByF5x3hRH/0YeXsPI

View file

@ -1,15 +1,22 @@
return { return {
"theprimeagen/harpoon", "theprimeagen/harpoon",
config = function() branch = "harpoon2",
local mark = require("harpoon.mark") dependencies = "nvim-lua/plenary.nvim",
local ui = require("harpoon.ui") config = function()
local harpoon = require("harpoon")
vim.keymap.set("n", "<leader>a", mark.add_file) harpoon:setup()
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
vim.keymap.set("n", "<C-h>", function() ui.nav_file(1) end) vim.keymap.set("n", "<leader>a", function() harpoon:list():add() end)
vim.keymap.set("n", "<C-j>", function() ui.nav_file(2) end) vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
vim.keymap.set("n", "<C-k>", function() ui.nav_file(3) end)
vim.keymap.set("n", "<C-l>", function() ui.nav_file(4) end) vim.keymap.set("n", "<C-h>", function() harpoon:list():select(1) end)
end vim.keymap.set("n", "<C-j>", function() harpoon:list():select(2) end)
vim.keymap.set("n", "<C-k>", function() harpoon:list():select(3) end)
vim.keymap.set("n", "<C-l>", 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,
} }