You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.1 KiB

  1. return {
  2. "ThePrimeagen/harpoon",
  3. branch = "harpoon2",
  4. dependencies = {
  5. "nvim-lua/plenary.nvim",
  6. },
  7. config = function()
  8. local harpoon = require("harpoon")
  9. -- REQUIRED
  10. harpoon:setup()
  11. -- REQUIRED
  12. local keymap = vim.keymap
  13. keymap.set("n", "<leader>a", function()
  14. harpoon:list():add()
  15. end, { desc = "Mark file with harpoon" })
  16. keymap.set("n", "<C-e>", function()
  17. harpoon.ui:toggle_quick_menu(harpoon:list())
  18. end, { desc = "Toggle quick menu for harpoon" })
  19. keymap.set("n", "<leader>1", function()
  20. harpoon:list():select(1)
  21. end, { desc = "Go to first harpoon file" })
  22. keymap.set("n", "<leader>2", function()
  23. harpoon:list():select(2)
  24. end, { desc = "Go to second harpoon file" })
  25. keymap.set("n", "<leader>3", function()
  26. harpoon:list():select(3)
  27. end, { desc = "Go to third harpoon file" })
  28. keymap.set("n", "<leader>4", function()
  29. harpoon:list():select(4)
  30. end, { desc = "Go to fourth harpoon file" })
  31. keymap.set("n", "<C-S-P>", function()
  32. harpoon:list():prev()
  33. end)
  34. keymap.set("n", "<C-S-N>", function()
  35. harpoon:list():next()
  36. end)
  37. end,
  38. }