aboutsummaryrefslogtreecommitdiffstats
path: root/nvim/lua/plugins/harpoon.lua
blob: abc9e0492bdfdb349c193347118eaa3628e0769d (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
return {
    'ThePrimeagen/harpoon', -- quick file navigator
    branch = "harpoon2",
    dependencies = {
        'nvim-lua/plenary.nvim',
        'nvim-telescope/telescope.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():add()
            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"
        },
    }
}