neovim: update harpoon

This commit is contained in:
2023-12-03 22:06:21 +03:00
parent fcef73cd98
commit d76402afdd
2 changed files with 14 additions and 9 deletions

View File

@@ -1,18 +1,23 @@
local ui = require("harpoon.ui")
local mark = require("harpoon.mark")
local harpoon = require("harpoon")
vim.keymap.set("n", "<leader>a", mark.add_file)
vim.keymap.set("n", "<leader>s", ui.toggle_quick_menu)
harpoon:setup({})
vim.keymap.set("n", "<leader>a", function()
harpoon:list():append()
end)
vim.keymap.set("n", "<leader>s", function()
harpoon.ui:toggle_quick_menu(harpoon:list())
end)
vim.keymap.set("n", "<leader>1", function()
ui.nav_file(1)
harpoon:list():select(1)
end)
vim.keymap.set("n", "<leader>2", function()
ui.nav_file(2)
harpoon:list():select(2)
end)
vim.keymap.set("n", "<leader>3", function()
ui.nav_file(3)
harpoon:list():select(3)
end)
vim.keymap.set("n", "<leader>4", function()
ui.nav_file(4)
harpoon:list():select(4)
end)