dotfiles/nvim/plugin/harpoon.lua
2025-03-02 23:00:06 +00:00

19 lines
439 B
Lua

local harpoon = require "harpoon"
harpoon:setup()
vim.keymap.set("n", "<leader>hm", function()
harpoon:list():add()
end)
vim.keymap.set("n", "<leader>hl", function()
harpoon.ui:toggle_quick_menu(harpoon:list())
end)
-- Set <space>1..<space>5 be my shortcuts to moving to the files
for _, idx in ipairs { 1, 2, 3, 4, 5 } do
vim.keymap.set("n", string.format("<space>%d", idx), function()
harpoon:list():select(idx)
end)
end