mirror of
https://github.com/LazyVim/starter.git
synced 2026-07-22 04:21:03 +00:00
Config harpoon myself
This commit is contained in:
parent
fe2b8eeb89
commit
dbb97de380
2 changed files with 43 additions and 1 deletions
|
|
@ -38,7 +38,7 @@ local plugins = {
|
|||
{ import = "lazyvim.plugins.extras.ui.treesitter-context" },
|
||||
|
||||
{ import = "lazyvim.plugins.extras.editor.telescope" },
|
||||
{ import = "lazyvim.plugins.extras.editor.harpoon2" },
|
||||
-- { import = "lazyvim.plugins.extras.editor.harpoon2" },
|
||||
{ import = "lazyvim.plugins.extras.editor.refactoring" },
|
||||
{ import = "lazyvim.plugins.extras.editor.aerial" }, -- <leader>ss list constants
|
||||
{ import = "lazyvim.plugins.extras.editor.dial" }, -- like speadating
|
||||
|
|
|
|||
42
lua/plugins/harpoon.lua
Normal file
42
lua/plugins/harpoon.lua
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
return {
|
||||
"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, 9 do
|
||||
table.insert(keys, {
|
||||
"<leader>" .. i,
|
||||
function()
|
||||
require("harpoon"):list():select(i)
|
||||
end,
|
||||
desc = "Harpoon to File " .. i,
|
||||
})
|
||||
end
|
||||
return keys
|
||||
end,
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue