configure harpoon

This commit is contained in:
Lucas Barbieri 2023-08-04 18:39:25 -03:00
parent 5b2d3652ba
commit 0d6f422035

View File

@ -1,4 +1,15 @@
return {
"ThePrimeagen/harpoon",
opts = {},
config = function()
vim.keymap.set("n", "<leader>m", [[<cmd>lua require("harpoon.mark").add_file()<CR>]],
{ desc = "add harpoon mark to current file" })
vim.keymap.set("n", "<leader>M", [[<cmd>lua require("harpoon.ui").toggle_quick_menu()<CR>]],
{ desc = "open harpoon quick menu" })
for i = 1, 5 do
local keybinding = string.format("<A-%s>", i)
local command = string.format("<cmd>lua require('harpoon.ui').nav_file(%s)<CR>", i)
vim.keymap.set("n", keybinding, command, { desc = string.format("go to %s° mark", i) })
end
end
}