mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-28 03:30:12 +02:00
fix(harpoon): optimizes harpoon keys (#2877)
This commit is contained in:
parent
5646ee5191
commit
50b7f426f2
1 changed files with 30 additions and 52 deletions
|
@ -6,7 +6,8 @@ return {
|
|||
width = vim.api.nvim_win_get_width(0) - 4,
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
keys = function()
|
||||
local keys = {
|
||||
{
|
||||
"<leader>H",
|
||||
function()
|
||||
|
@ -21,41 +22,18 @@ return {
|
|||
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||
end,
|
||||
desc = "Harpoon Quick Menu",
|
||||
},
|
||||
{
|
||||
"<leader>1",
|
||||
}
|
||||
}
|
||||
|
||||
for i = 1, 5 do
|
||||
table.insert(keys, {
|
||||
"<leader>" .. i,
|
||||
function()
|
||||
require("harpoon"):list():select(1)
|
||||
require("harpoon"):list():select(i)
|
||||
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",
|
||||
},
|
||||
},
|
||||
desc = "Harpoon to File " .. i,
|
||||
})
|
||||
end
|
||||
return keys
|
||||
end
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue