From 90a657be8b080c3d3c5cacab50273109f1d7ff54 Mon Sep 17 00:00:00 2001 From: Naz Date: Sat, 8 Feb 2025 11:53:19 +0100 Subject: =?UTF-8?q?=E2=9C=A8feat:=20add=20ThePrimeagen/harpoon=20plugin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/config/mappings.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lua/config') diff --git a/lua/config/mappings.lua b/lua/config/mappings.lua index cc6d97b..4c8e849 100644 --- a/lua/config/mappings.lua +++ b/lua/config/mappings.lua @@ -39,3 +39,20 @@ vim.keymap.set("n", "gd", vim.lsp.buf.definition, { desc = "LSP Definition" }) vim.keymap.set("n", "er", vim.diagnostic.open_float, { desc = "LSP Diagnostics" }) vim.keymap.set({ "n", "v" }, "ca", vim.lsp.buf.code_action, { desc = "LSP Code Action" }) vim.keymap.set("n", "gf", vim.lsp.buf.format, { desc = "LSP Format" }) + +-- harpoon keymaps + +vim.keymap.set("n", "a", function() + require("harpoon"):list():add() +end, { desc = "Harpoon Add" }) +vim.keymap.set("n", "h", function() + require("harpoon").ui:toggle_quick_menu(builtin:list()) +end, { desc = "Harpoon Menu" }) + +-- Toggle previous & next buffers stored within Harpoon list +vim.keymap.set("n", "", function() + require("harpoon"):list():prev() +end, { desc = "Harpoon Previous" }) +vim.keymap.set("n", "", function() + require("harpoon"):list():next() +end, { desc = "Harpoon Next" }) -- cgit v1.2.3