From ff0dcc1e994859e7c2a6a5ab4704923cebdc58fe Mon Sep 17 00:00:00 2001 From: Nybkox Date: Mon, 29 Jan 2024 15:16:33 +0100 Subject: [PATCH] feat(extras): add harpoon2 --- .../plugins/extras/editor/harpoon2.lua | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/editor/harpoon2.lua diff --git a/lua/lazyvim/plugins/extras/editor/harpoon2.lua b/lua/lazyvim/plugins/extras/editor/harpoon2.lua new file mode 100644 index 00000000..5011cdd5 --- /dev/null +++ b/lua/lazyvim/plugins/extras/editor/harpoon2.lua @@ -0,0 +1,64 @@ +return { + "ThePrimeagen/harpoon", + branch = "harpoon2", + config = function() + local harpoon = require("harpoon") + harpoon:setup({ + menu = { + width = vim.api.nvim_win_get_width(0) - 4, + }, + }) + end, + keys = { + { + "H", + function() + require("harpoon"):list():append() + end, + desc = "Harpoon file", + }, + { + "h", + function() + local harpoon = require("harpoon") + harpoon.ui:toggle_quick_menu(harpoon:list()) + end, + desc = "Harpoon quick menu", + }, + { + "1", + function() + require("harpoon"):list():select(1) + end, + desc = "Harpoon to file 1", + }, + { + "2", + function() + require("harpoon"):list():select(2) + end, + desc = "Harpoon to file 2", + }, + { + "3", + function() + require("harpoon"):list():select(3) + end, + desc = "Harpoon to file 3", + }, + { + "4", + function() + require("harpoon"):list():select(4) + end, + desc = "Harpoon to file 4", + }, + { + "5", + function() + require("harpoon"):list():select(5) + end, + desc = "Harpoon to file 5", + }, + }, +}