diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index de94ae14..ee09fa66 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -32,7 +32,7 @@ "git-worktree.nvim": { "branch": "master", "commit": "f247308e68dab9f1133759b05d944569ad054546" }, "gitsigns.nvim": { "branch": "main", "commit": "d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9" }, "glance.nvim": { "branch": "master", "commit": "8ed5cf3b3b1231ea696d88c9efd977027429d869" }, - "harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" }, + "harpoon": { "branch": "harpoon2", "commit": "2d3abde3c4db4981294f9405ca11e3156ae78323" }, "headlines.nvim": { "branch": "master", "commit": "e3d7bfdf40e41a020d966d35f8b48d75b90367d2" }, "highlight-undo.nvim": { "branch": "main", "commit": "50a6884a8476be04ecce8f1c4ed692c5000ef0a1" }, "hydra.nvim": { "branch": "master", "commit": "55de54543d673824435930ecf533256eea2e565b" }, diff --git a/.config/nvim/lua/plugins/extras/editor/harpoon.lua b/.config/nvim/lua/plugins/extras/editor/harpoon.lua index 98942f7d..7200cd1f 100644 --- a/.config/nvim/lua/plugins/extras/editor/harpoon.lua +++ b/.config/nvim/lua/plugins/extras/editor/harpoon.lua @@ -1,24 +1,26 @@ return { { "ThePrimeagen/harpoon", + branch = "harpoon2", + dependencies = { "nvim-lua/plenary.nvim" }, --stylua: ignore keys = { - { "ha", function() require("harpoon.mark").add_file() end, desc = "Add Mark" }, - { "hh", function() require("harpoon.ui").toggle_quick_menu() end, desc = "Menu" }, + { "ha", function() require("harpoon"):list():append() end, desc = "Add Mark" }, + { "hh", function() require("harpoon").ui:toggle_quick_menu(require("harpoon"):list()) end, desc = "Menu" }, { "hf", "Telescope harpoon marks", desc = "Files" }, - { "h1", function() require("harpoon.ui").nav_file(1) end, desc = "File 1" }, - { "h2", function() require("harpoon.ui").nav_file(2) end, desc = "File 2" }, - { "h3", function() require("harpoon.ui").nav_file(3) end, desc = "File 3" }, - { "h4", function() require("harpoon.ui").nav_file(4) end, desc = "File 4" }, - { "h5", function() require("harpoon.ui").nav_file(5) end, desc = "File 5" }, - { "h6", function() require("harpoon.ui").nav_file(6) end, desc = "File 6" }, - { "h7", function() require("harpoon.ui").nav_file(7) end, desc = "File 7" }, - { "h8", function() require("harpoon.ui").nav_file(8) end, desc = "File 8" }, - { "h9", function() require("harpoon.ui").nav_file(9) end, desc = "File 9" }, - { "]H", function() require("harpoon.ui").nav_next() end, desc = "Next Harpoon File" }, - { "[H", function() require("harpoon.ui").nav_prev() end, desc = "Prev Harpoon File" }, - { "", function() require("harpoon.ui").nav_next() end, desc = "Next Harpoon File" }, - { "", function() require("harpoon.ui").nav_prev() end, desc = "Prev Harpoon File" }, + { "h1", function() require("harpoon"):list():select(1) end, desc = "File 1" }, + { "h2", function() require("harpoon"):list():select(2) end, desc = "File 2" }, + { "h3", function() require("harpoon"):list():select(3) end, desc = "File 3" }, + { "h4", function() require("harpoon"):list():select(4) end, desc = "File 4" }, + { "h5", function() require("harpoon"):list():select(5) end, desc = "File 5" }, + { "h6", function() require("harpoon"):list():select(6) end, desc = "File 6" }, + { "h7", function() require("harpoon"):list():select(7) end, desc = "File 7" }, + { "h8", function() require("harpoon"):list():select(8) end, desc = "File 8" }, + { "h9", function() require("harpoon"):list():select(9) end, desc = "File 9" }, + { "]H", function() require("harpoon"):list():next() end, desc = "Next Harpoon File" }, + { "[H", function() require("harpoon"):list():prev() end, desc = "Prev Harpoon File" }, + { "", function() require("harpoon"):list():next() end, desc = "Next Harpoon File" }, + { "", function() require("harpoon"):list():prev() end, desc = "Prev Harpoon File" }, }, opts = { globalsettings = { @@ -26,7 +28,9 @@ return { enter_on_sendcmd = true, }, }, - config = function() + config = function(_, opts) + require("harpoon").setup(opts) + require("lazyvim.util").on_load("telescope.nvim", function() require("telescope").load_extension("harpoon") end)