From 25b6aeff3a1912bea9d3b207e5c15cf1eb764746 Mon Sep 17 00:00:00 2001 From: Titus Moore Date: Fri, 21 Mar 2025 16:30:13 -0400 Subject: [PATCH] Updated harpoon --- init.lua | 34 ++++++++++++++++++++++++++++++++++ lua/custom/plugins/init.lua | 2 ++ 2 files changed, 36 insertions(+) diff --git a/init.lua b/init.lua index 5362ceef..b5af30ff 100644 --- a/init.lua +++ b/init.lua @@ -1026,5 +1026,39 @@ vim.keymap.set('n', 'n', 'nzzzv', { noremap = true, silent = true }) vim.keymap.set('n', 'N', 'Nzzzv', { noremap = true, silent = true }) -- END CUSTOM REMAPS +-- CUSTOM CODE +local harpoon = require 'harpoon' + +harpoon:setup() + +-- Harpoon Remaps +vim.set('n', 'ha', function() + harpoon:list():add() +end) +vim.set('n', 'hh', function() + harpoon.ui:toggle_quick_menu(harpoon:list()) +end) + +vim.set('n', '', function() + harpoon:list():select(1) +end) +vim.set('n', '', function() + harpoon:list():select(2) +end) +vim.set('n', '', function() + harpoon:list():select(3) +end) +vim.set('n', '', function() + harpoon:list():select(4) +end) + +vim.set('n', '', function() + harpoon:list():prev() +end) +vim.set('n', '', function() + harpoon:list():next() +end) +-- END CUSTOM CODE + -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 9ca21299..907ae699 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -23,6 +23,8 @@ return { }, { 'ThePrimeagen/harpoon', + branch = 'harpoon2', + dependencies = { 'nvim-lua/plenary.nvim' }, }, { 'nvim-neo-tree/neo-tree.nvim',