- return {
- "ThePrimeagen/harpoon",
- branch = "harpoon2",
- dependencies = {
- "nvim-lua/plenary.nvim",
- },
- config = function()
- local harpoon = require("harpoon")
-
- -- REQUIRED
- harpoon:setup()
- -- REQUIRED
-
- -- set keymaps
- local keymap = vim.keymap -- for conciseness
-
- keymap.set("n", "<leader>a", function ()
- harpoon:list():append()
- end, { desc = "Mark file with harpoon" })
-
- keymap.set("n", "<C-e>", function ()
- harpoon.ui:toggle_quick_menu()
- end, { desc = "Toggle quick menu for harpoon" })
-
- keymap.set("n", "<C-,>", function()
- harpoon:list():prev()
- end, { desc = "Go to previous harpoon mark" })
-
- keymap.set("n", "<C-.>", function()
- harpoon:list():next()
- end, { desc = "Go to next harpoon mark" })
-
- keymap.set("n", "<C-h>", function()
- harpoon:list():select(1)
- end, { desc = "Go to first harpoon file" })
-
- keymap.set("n", "<C-j>", function()
- harpoon:list():select(2)
- end, { desc = "Go to second harpoon file" })
-
- keymap.set("n", "<C-k>", function()
- harpoon:list():select(3)
- end, { desc = "Go to third harpoon file" })
-
- keymap.set("n", "<C-l>", function()
- harpoon:list():select(4)
- end, { desc = "Go to fourth harpoon file" })
- end,
- }
|