Add LazyVim configuration example for Harpoon2 readme
Closed this issue · 2 comments
What issue are you having that you need harpoon to solve?
As a newbie Neovim I user want to be able to easily integrate Harpoon2 into my LazyVim setup. For this it would be helpful if you could provide a little snippet in the readme section of the repository on how to do that
Why doesn't the current config help?
LazyVim has it's own configuration structure to custom load plugins, which is not reflected in the readme. One could figure it out alone, but I think a little snippet in the readme would improve the experience
What proposed api changes are you suggesting?
I saw this Reddit post which you could use as an inspiration. If that matters I tested the example in my setup and it's working. Here is one of the examples you could use as a basis to add an example to the readme:
{
"theprimeagen/harpoon",
branch = "harpoon2",
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
require("harpoon"):setup()
end,
keys = {
{ "<leader>A", function() require("harpoon"):list():append() end, desc = "harpoon file", },
{ "<leader>a", function() local harpoon = require("harpoon") harpoon.ui:toggle_quick_menu(harpoon:list()) end, desc = "harpoon quick menu", },
{ "<leader>1", function() require("harpoon"):list():select(1) end, desc = "harpoon to file 1", },
{ "<leader>2", function() require("harpoon"):list():select(2) end, desc = "harpoon to file 2", },
{ "<leader>3", function() require("harpoon"):list():select(3) end, desc = "harpoon to file 3", },
{ "<leader>4", function() require("harpoon"):list():select(4) end, desc = "harpoon to file 4", },
{ "<leader>5", function() require("harpoon"):list():select(5) end, desc = "harpoon to file 5", },
},
},
A PR implementing this was closed just last week, see #422 (comment)