Add harpoon plugin
parent
5694dde7a5
commit
9640118aa7
@ -0,0 +1,35 @@
|
|||||||
|
return {
|
||||||
|
'ThePrimeagen/harpoon',
|
||||||
|
branch = 'harpoon2',
|
||||||
|
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||||
|
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,
|
||||||
|
}
|
Loading…
Reference in New Issue