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.

49 lines
1.2 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. -- set keymaps
  13. local keymap = vim.keymap -- for conciseness
  14. keymap.set("n", "<leader>a", function ()
  15. harpoon:list():append()
  16. end, { desc = "Mark file with harpoon" })
  17. keymap.set("n", "<C-e>", function ()
  18. harpoon.ui:toggle_quick_menu()
  19. end, { desc = "Toggle quick menu for harpoon" })
  20. keymap.set("n", "<C-,>", function()
  21. harpoon:list():prev()
  22. end, { desc = "Go to previous harpoon mark" })
  23. keymap.set("n", "<C-.>", function()
  24. harpoon:list():next()
  25. end, { desc = "Go to next harpoon mark" })
  26. keymap.set("n", "<C-h>", function()
  27. harpoon:list():select(1)
  28. end, { desc = "Go to first harpoon file" })
  29. keymap.set("n", "<C-j>", function()
  30. harpoon:list():select(2)
  31. end, { desc = "Go to second harpoon file" })
  32. keymap.set("n", "<C-k>", function()
  33. harpoon:list():select(3)
  34. end, { desc = "Go to third harpoon file" })
  35. keymap.set("n", "<C-l>", function()
  36. harpoon:list():select(4)
  37. end, { desc = "Go to fourth harpoon file" })
  38. end,
  39. }