diff options
author | Squibid <me@zacharyscheiman.com> | 2024-03-09 00:02:02 -0500 |
---|---|---|
committer | Squibid <me@zacharyscheiman.com> | 2024-03-09 00:02:02 -0500 |
commit | debeca659ae2e41ca3f248a5ee30dbbaca6aebc8 (patch) | |
tree | b742b75fa35ff939062e25b7a8eb185744137084 /lua/conf/binds.lua | |
parent | 6deb1b6a6bd72319db2845a53450a6039c613954 (diff) | |
download | nvim-debeca659ae2e41ca3f248a5ee30dbbaca6aebc8.tar.gz nvim-debeca659ae2e41ca3f248a5ee30dbbaca6aebc8.tar.bz2 nvim-debeca659ae2e41ca3f248a5ee30dbbaca6aebc8.zip |
update harpoon to harpoon 2
Diffstat (limited to '')
-rw-r--r-- | lua/conf/binds.lua | 21 |
1 files changed, 12 insertions, 9 deletions
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", "<leader>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", "<C-e>", ui.toggle_quick_menu) - map('n', '<C-q>', function() ui.nav_file(1) end) - map('n', '<C-g>', function() ui.nav_file(2) end) - map('n', '<C-h>', function() ui.nav_file(3) end) - map('n', '<C-i>', function() ui.nav_file(4) end) + map('n', '<C-q>', function() harpoon:list():select(1) end) + map('n', '<C-g>', function() harpoon:list():select(2) end) + map('n', '<C-h>', function() harpoon:list():select(3) end) + map('n', '<C-i>', function() harpoon:list():select(4) end) + + map("n", "<C-S-P>", function() harpoon:list():prev() end) + map("n", "<C-S-N>", function() harpoon:list():next() end) + + map("n", "<C-e>", function() require("core.harpoon").switcher() end) end map('n', '<leader>u', '<cmd>UndotreeToggle<CR>', { desc = 'Open undo tree.' }) |