20 lines
688 B
Lua
20 lines
688 B
Lua
-- ~/.config/nvim/lua/plugins/harpoon.lua
|
|
|
|
return {
|
|
"ThePrimeagen/harpoon",
|
|
branch = "harpoon2", -- Use the latest Harpoon 2 branch for best support
|
|
dependencies = { "nvim-lua/plenary.nvim" },
|
|
config = function()
|
|
require("harpoon"):setup({})
|
|
-- Map <leader>h to toggle the Harpoon quick menu
|
|
vim.keymap.set("n", "<leader>h", function()
|
|
require("harpoon").ui:toggle_quick_menu(require("harpoon"):list())
|
|
end, { desc = "Harpoon quick menu" })
|
|
-- Optionally add a key to add the current file (or directory) to Harpoon
|
|
vim.keymap.set("n", "<leader>m", function()
|
|
require("harpoon"):list():add()
|
|
end, { desc = "Mark file (Harpoon)" })
|
|
end,
|
|
}
|
|
|