66 lines
1.3 KiB
Lua
66 lines
1.3 KiB
Lua
function number_switch(harpoon)
|
|
for i = 1, 10, 1 do
|
|
vim.keymap.set("n", "<leader>" .. i, function()
|
|
harpoon:list():select(i)
|
|
end)
|
|
end
|
|
end
|
|
|
|
return {
|
|
"ThePrimeagen/harpoon",
|
|
branch = "harpoon2",
|
|
dependencies = {
|
|
"nvim-lua/plenary.nvim",
|
|
},
|
|
|
|
opts = {
|
|
settings = {
|
|
tabline = false,
|
|
save_on_toggle = true,
|
|
save_on_change = true,
|
|
excluded_filetypes = {
|
|
"harpoon",
|
|
"neo-tree",
|
|
},
|
|
},
|
|
menu = {
|
|
border = "rounded",
|
|
width = vim.api.nvim_win_get_width(0) - 4,
|
|
},
|
|
},
|
|
|
|
-- vim.g.harpoon_log_level = "fatal",
|
|
config = function(_, opts)
|
|
local harpoon = require("harpoon")
|
|
harpoon:setup(opts)
|
|
|
|
local harpoon_extensions = require("harpoon.extensions")
|
|
harpoon:extend(harpoon_extensions.builtins.highlight_current_file())
|
|
|
|
vim.keymap.set("n", "<leader>h", function()
|
|
harpoon.ui:toggle_quick_menu(harpoon:list())
|
|
end)
|
|
vim.keymap.set("n", "<leader>a", function()
|
|
harpoon:list():add()
|
|
end)
|
|
vim.keymap.set("n", "<leader>H", function()
|
|
harpoon:list():add()
|
|
end)
|
|
vim.keymap.set("n", "<leader>l", function()
|
|
harpoon:list():remove()
|
|
end)
|
|
vim.keymap.set("n", "<leader>L", function()
|
|
harpoon:list():clear()
|
|
end)
|
|
|
|
vim.keymap.set("n", "<S-h>", function()
|
|
harpoon:list():prev()
|
|
end)
|
|
vim.keymap.set("n", "<S-l>", function()
|
|
harpoon:list():next()
|
|
end)
|
|
|
|
-- number_switch(harpoon)
|
|
end,
|
|
}
|