Skip to content

Commit

Permalink
feat: add harpoon (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xricksanchez authored Apr 16, 2023
1 parent 7996bd3 commit debeefe
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lua/astrocommunity/motion/harpoon/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Harpoon

**Repository:** <https://github.com/ThePrimeagen/harpoon>

Getting you where you want with the fewest keystrokes.
33 changes: 33 additions & 0 deletions lua/astrocommunity/motion/harpoon/harpoon.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
local prefix = "<leader><leader>"
return {
"ThePrimeagen/harpoon",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
},
cmd = { "Harpoon" },
keys = {
{ prefix, desc = "Harpoon" },
{ prefix .. "a", function() require("harpoon.mark").add_file() end, desc = "Add file" },
{ prefix .. "e", function() require("harpoon.ui").toggle_quick_menu() end, desc = "Toggle quick menu" },
{ prefix .. "h", function() require("harpoon.ui").nav_next() end, desc = "Goto previous mark" },
{ prefix .. "l", function() require("harpoon.ui").nav_prev() end, desc = "Goto next mark" },
{ prefix .. "m", "<cmd>Telescope harpoon marks<CR>", desc = "Show marks in Telescope" },
{
prefix .. "t",
function()
local num = tonumber(vim.fn.input "GoTo terminal window number: ")
require("harpoon.term").gotoTerminal(num)
end,
desc = "Goto to terminal window",
},
{
prefix .. "j",
function()
local num = tonumber(vim.fn.input "GoTo Tmux window number: ")
require("harpoon.tmux").gotoTerminal(num)
end,
desc = "Goto to TMUX tmux window",
},
},
}

0 comments on commit debeefe

Please sign in to comment.