From 0d6f422035ec81b6d30d5752adf77e93366cb63e Mon Sep 17 00:00:00 2001 From: Lucas Barbieri Date: Fri, 4 Aug 2023 18:39:25 -0300 Subject: [PATCH] configure harpoon --- lua/custom/plugins/harpoon.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lua/custom/plugins/harpoon.lua b/lua/custom/plugins/harpoon.lua index f8a837b..8eebb61 100644 --- a/lua/custom/plugins/harpoon.lua +++ b/lua/custom/plugins/harpoon.lua @@ -1,4 +1,15 @@ return { "ThePrimeagen/harpoon", opts = {}, + config = function() + vim.keymap.set("n", "m", [[lua require("harpoon.mark").add_file()]], + { desc = "add harpoon mark to current file" }) + vim.keymap.set("n", "M", [[lua require("harpoon.ui").toggle_quick_menu()]], + { desc = "open harpoon quick menu" }) + for i = 1, 5 do + local keybinding = string.format("", i) + local command = string.format("lua require('harpoon.ui').nav_file(%s)", i) + vim.keymap.set("n", keybinding, command, { desc = string.format("go to %s° mark", i) }) + end + end }