From debeca659ae2e41ca3f248a5ee30dbbaca6aebc8 Mon Sep 17 00:00:00 2001 From: Squibid Date: Sat, 9 Mar 2024 00:02:02 -0500 Subject: update harpoon to harpoon 2 --- lua/conf/binds.lua | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'lua/conf/binds.lua') diff --git a/lua/conf/binds.lua b/lua/conf/binds.lua index b5242a7..0752a93 100644 --- a/lua/conf/binds.lua +++ b/lua/conf/binds.lua @@ -104,21 +104,24 @@ if pcall(require, "telescope") then end -- harpoon -if pcall(require, 'harpoon') then - local mark = require("harpoon.mark") - local ui = require("harpoon.ui") +if (pcall(require, 'harpoon')) then + local harpoon = require("harpoon") map("n", "a", function() - mark.add_file() + harpoon:list():append() vim.notify('added new file to quickmarks', vim.log.levels.INFO, { title = misc.appid, }) end) - map("n", "", ui.toggle_quick_menu) - map('n', '', function() ui.nav_file(1) end) - map('n', '', function() ui.nav_file(2) end) - map('n', '', function() ui.nav_file(3) end) - map('n', '', function() ui.nav_file(4) end) + map('n', '', function() harpoon:list():select(1) end) + map('n', '', function() harpoon:list():select(2) end) + map('n', '', function() harpoon:list():select(3) end) + map('n', '', function() harpoon:list():select(4) end) + + map("n", "", function() harpoon:list():prev() end) + map("n", "", function() harpoon:list():next() end) + + map("n", "", function() require("core.harpoon").switcher() end) end map('n', 'u', 'UndotreeToggle', { desc = 'Open undo tree.' }) -- cgit v1.2.1