updated to harpoon2
This commit is contained in:
parent
4c83d8f94b
commit
d33e8b3729
1 changed files with 18 additions and 11 deletions
|
@ -1,15 +1,22 @@
|
|||
return {
|
||||
"theprimeagen/harpoon",
|
||||
branch = "harpoon2",
|
||||
dependencies = "nvim-lua/plenary.nvim",
|
||||
config = function()
|
||||
local mark = require("harpoon.mark")
|
||||
local ui = require("harpoon.ui")
|
||||
local harpoon = require("harpoon")
|
||||
|
||||
vim.keymap.set("n", "<leader>a", mark.add_file)
|
||||
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
|
||||
harpoon:setup()
|
||||
|
||||
vim.keymap.set("n", "<C-h>", function() ui.nav_file(1) end)
|
||||
vim.keymap.set("n", "<C-j>", function() ui.nav_file(2) end)
|
||||
vim.keymap.set("n", "<C-k>", function() ui.nav_file(3) end)
|
||||
vim.keymap.set("n", "<C-l>", function() ui.nav_file(4) end)
|
||||
end
|
||||
vim.keymap.set("n", "<leader>a", function() harpoon:list():add() end)
|
||||
vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
||||
|
||||
vim.keymap.set("n", "<C-h>", function() harpoon:list():select(1) end)
|
||||
vim.keymap.set("n", "<C-j>", function() harpoon:list():select(2) end)
|
||||
vim.keymap.set("n", "<C-k>", function() harpoon:list():select(3) end)
|
||||
vim.keymap.set("n", "<C-l>", function() harpoon:list():select(4) end)
|
||||
|
||||
-- Toggle previous & next buffers stored within Harpoon list
|
||||
vim.keymap.set("n", "<C-S-P>", function() harpoon:list():prev() end)
|
||||
vim.keymap.set("n", "<C-S-N>", function() harpoon:list():next() end)
|
||||
end,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue