Huge configs updates
This commit is contained in:
@ -1,19 +1,56 @@
|
||||
function number_switch(harpoon)
|
||||
for i = 1, 9, 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 = {
|
||||
save_on_toggle = false,
|
||||
save_on_change = true,
|
||||
excluded_filetypes = { "harpoon" },
|
||||
},
|
||||
menu = {
|
||||
width = vim.api.nvim_win_get_width(0) - 4,
|
||||
},
|
||||
},
|
||||
|
||||
config = function()
|
||||
-- local harpoon = require("harpoon")
|
||||
-- harpoon.setup({
|
||||
-- save_on_toggle = false,
|
||||
-- save_on_change = true,
|
||||
-- enter_on_sendcmd = false,
|
||||
-- tmux_autoclose_windows = false,
|
||||
-- excluded_filetypes = { "harpoon" },
|
||||
-- mark_branch = false,
|
||||
-- })
|
||||
-- require("harpoon"):setup()
|
||||
local harpoon = require("harpoon")
|
||||
harpoon:setup()
|
||||
|
||||
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>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", "<M-h>", function()
|
||||
harpoon:list():prev()
|
||||
end)
|
||||
vim.keymap.set("n", "<M-l>", function()
|
||||
harpoon:list():next()
|
||||
end)
|
||||
|
||||
number_switch(harpoon)
|
||||
end,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user