aboutsummaryrefslogtreecommitdiffstats
path: root/nvim/lua/plugins/harpoon.lua
blob: 061ca9e0917008cbdc07cc2b0a7f3286c8c72237 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
return {
    'ThePrimeagen/harpoon', -- quick file navigator
    branch = "harpoon2",
    dependencies = 'nvim-lua/plenary.nvim',
    config = function()
        require("harpoon"):setup()
    end,
    keys = {
        {"<leader><cr>", function()
                local harpoon = require("harpoon")
                harpoon.ui:toggle_quick_menu(harpoon:list())
            end,
            desc = "Open Harpoon Quickmenu"
        },
        {"<leader>m", function()
                local harpoon = require("harpoon")
                harpoon:list():append()
            end,
            desc = "Add file to harpoon"
        },
        {"<leader>1", function()
                local harpoon = require("harpoon")
                harpoon:list():select(1)
            end,
            desc = "Navigate to the first file"
        },
        {"<leader>2", function()
                local harpoon = require("harpoon")
                harpoon:list():select(2)
            end,
            desc = "Navigate to the second file"
        },
        {"<leader>3", function()
                local harpoon = require("harpoon")
                harpoon:list():select(3)
            end,
            desc = "Navigate to the third file"
        },
        {"<leader>4", function()
                local harpoon = require("harpoon")
                harpoon:list():select(4)
            end,
            desc = "Navigate to the fourth file"
        },
        }
}