From 6bef8f32b19778fdfe52f0eb39719425508dcc7b Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Thu, 24 Apr 2025 11:36:39 +0300 Subject: Refactored nvim config to make it easier and less insanely nested --- .config/nvim/lua/plugins/harpoon.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .config/nvim/lua/plugins/harpoon.lua (limited to '.config/nvim/lua/plugins/harpoon.lua') diff --git a/.config/nvim/lua/plugins/harpoon.lua b/.config/nvim/lua/plugins/harpoon.lua new file mode 100644 index 0000000..5627e2f --- /dev/null +++ b/.config/nvim/lua/plugins/harpoon.lua @@ -0,0 +1,23 @@ +return { + 'ThePrimeagen/harpoon', + branch = 'harpoon2', + dependencies = { 'nvim-lua/plenary.nvim' }, + keys = { '', 'a', '1', '2', '3', '4', '5' }, + 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) + + for i = 1, 9 do + vim.keymap.set('n', string.format('%d', i), function() + harpoon:list():select(i) + end) + end + end, +} -- cgit v1.3.1