Harpoon2
info
You can enable the extra with the :LazyExtras
command.
Plugins marked as optional will only be configured if they are installed.
Below you can find a list of included plugins and their default settings.
caution
You don't need to copy the default settings to your config. They are only shown here for reference.
harpoon
- Options
- Full Spec
opts = {
menu = {
width = vim.api.nvim_win_get_width(0) - 4,
},
settings = {
save_on_toggle = true,
},
}
{
"ThePrimeagen/harpoon",
branch = "harpoon2",
opts = {
menu = {
width = vim.api.nvim_win_get_width(0) - 4,
},
settings = {
save_on_toggle = true,
},
},
keys = function()
local keys = {
{
"<leader>H",
function()
require("harpoon"):list():add()
end,
desc = "Harpoon File",
},
{
"<leader>h",
function()
local harpoon = require("harpoon")
harpoon.ui:toggle_quick_menu(harpoon:list())
end,
desc = "Harpoon Quick Menu",
},
}
for i = 1, 5 do
table.insert(keys, {
"<leader>" .. i,
function()
require("harpoon"):list():select(i)
end,
desc = "Harpoon to File " .. i,
})
end
return keys
end,
}