mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-25 18:28:50 +02:00
feat(extras): add harpoon2 (#2455)
* feat(extras): add harpoon2 * Update lua/lazyvim/plugins/extras/editor/harpoon2.lua Co-authored-by: Iordanis Petkakis <dpetka2001@gmail.com> * chore: formatting --------- Co-authored-by: Iordanis Petkakis <dpetka2001@gmail.com>
This commit is contained in:
parent
21ca466db1
commit
cae22baf08
1 changed files with 61 additions and 0 deletions
61
lua/lazyvim/plugins/extras/editor/harpoon2.lua
Normal file
61
lua/lazyvim/plugins/extras/editor/harpoon2.lua
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
return {
|
||||||
|
"ThePrimeagen/harpoon",
|
||||||
|
branch = "harpoon2",
|
||||||
|
opts = {
|
||||||
|
menu = {
|
||||||
|
width = vim.api.nvim_win_get_width(0) - 4,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>H",
|
||||||
|
function()
|
||||||
|
require("harpoon"):list():append()
|
||||||
|
end,
|
||||||
|
desc = "Harpoon file",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>h",
|
||||||
|
function()
|
||||||
|
local harpoon = require("harpoon")
|
||||||
|
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||||
|
end,
|
||||||
|
desc = "Harpoon quick menu",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>1",
|
||||||
|
function()
|
||||||
|
require("harpoon"):list():select(1)
|
||||||
|
end,
|
||||||
|
desc = "Harpoon to file 1",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>2",
|
||||||
|
function()
|
||||||
|
require("harpoon"):list():select(2)
|
||||||
|
end,
|
||||||
|
desc = "Harpoon to file 2",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>3",
|
||||||
|
function()
|
||||||
|
require("harpoon"):list():select(3)
|
||||||
|
end,
|
||||||
|
desc = "Harpoon to file 3",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>4",
|
||||||
|
function()
|
||||||
|
require("harpoon"):list():select(4)
|
||||||
|
end,
|
||||||
|
desc = "Harpoon to file 4",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>5",
|
||||||
|
function()
|
||||||
|
require("harpoon"):list():select(5)
|
||||||
|
end,
|
||||||
|
desc = "Harpoon to file 5",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue