mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
feat(extras): add harpoon2
This commit is contained in:
parent
a50f92f755
commit
ff0dcc1e99
1 changed files with 64 additions and 0 deletions
64
lua/lazyvim/plugins/extras/editor/harpoon2.lua
Normal file
64
lua/lazyvim/plugins/extras/editor/harpoon2.lua
Normal file
|
|
@ -0,0 +1,64 @@
|
||||||
|
return {
|
||||||
|
"ThePrimeagen/harpoon",
|
||||||
|
branch = "harpoon2",
|
||||||
|
config = function()
|
||||||
|
local harpoon = require("harpoon")
|
||||||
|
harpoon:setup({
|
||||||
|
menu = {
|
||||||
|
width = vim.api.nvim_win_get_width(0) - 4,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
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
Reference in a new issue