Skip to content

Harpoon Extra

editor.harpoon installs Harpoon v2 and calls require("harpoon"):setup({}), which Harpoon requires for its autocmds and persistence hooks.

return {
extras = {
enabled = {
"editor.harpoon",
},
},
}

Because this extra adds a plugin, run:

:BlakExtras sync
Surface Contribution
Plugin ThePrimeagen/harpoon on branch harpoon2
Dependencies plenary.nvim
Setup require("harpoon"):setup({})
Keymap <leader>ha adds the current file
Keymap <leader>hh toggles the Harpoon quick menu
Keymap <leader>hp / <leader>hn jumps previous / next
Keymap <leader>h1 through <leader>h4 jumps to marked files

The keymaps appear in :BlakKeys.

<leader>ha
<leader>hh
<leader>h1

The quick menu is Harpoon’s editable list UI. Change lines there to reorder, remove, or add targets, then close it normally.

Blak keeps Harpoon on its upstream defaults. To pass setup options, add a matching lazy.nvim spec in plugins.specs; lazy.nvim merges it with the extra’s plugin spec:

return {
extras = {
enabled = { "editor.harpoon" },
},
plugins = {
specs = {
{
"ThePrimeagen/harpoon",
opts = {
settings = {
save_on_toggle = true,
sync_on_ui_close = true,
},
},
},
},
},
}
:BlakExtras disable editor.harpoon
:BlakExtras sync

Restart Blak to unload mappings and runtime hooks that already ran in the current session.