Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add harpoon #140

Merged
merged 7 commits into from
Apr 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>"
0xricksanchez marked this conversation as resolved.
Show resolved Hide resolved
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",
},
},
}