From b66e4efa7caae614335c694275133ef42384a98a Mon Sep 17 00:00:00 2001 From: Nicholas Moore Date: Tue, 13 May 2025 16:59:19 -0500 Subject: Refactor neovim config into multiple files --- nvim/lua/custom/plugins/harppon.lua | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 nvim/lua/custom/plugins/harppon.lua (limited to 'nvim/lua/custom/plugins/harppon.lua') diff --git a/nvim/lua/custom/plugins/harppon.lua b/nvim/lua/custom/plugins/harppon.lua new file mode 100644 index 0000000..1fc29bb --- /dev/null +++ b/nvim/lua/custom/plugins/harppon.lua @@ -0,0 +1,37 @@ +return { + { + 'ThePrimeagen/harpoon', + branch = 'harpoon2', + dependencies = { 'nvim-lua/plenary.nvim' }, + config = function() + local harpoon = require 'harpoon' + harpoon:setup() + vim.keymap.set('n', 'a', function() + harpoon:list():add() + end) + vim.keymap.set('n', '', function() + harpoon.ui:toggle_quick_menu(harpoon:list()) + end) + vim.keymap.set('n', '1', function() + harpoon:list():select(1) + end) + vim.keymap.set('n', '2', function() + harpoon:list():select(2) + end) + vim.keymap.set('n', '3', function() + harpoon:list():select(3) + end) + vim.keymap.set('n', '4', function() + harpoon:list():select(4) + end) + + -- Toggle previous & next buffers stored within Harpoon list + vim.keymap.set('n', '', function() + harpoon:list():prev() + end) + vim.keymap.set('n', '', function() + harpoon:list():next() + end) + end, + }, +} -- cgit v1.3