feat: Adds more keymaps to harpoon nvim config

This commit is contained in:
2024-11-11 10:45:50 -05:00
parent 051a418d0b
commit 365baec18a

View File

@@ -6,7 +6,15 @@ return {
},
config = function()
local harpoon = require('harpoon')
harpoon:setup({})
harpoon:setup({
settings = {
save_on_toggle = true,
sync_on_ui_close = true,
key = function()
return vim.loop.cwd()
end,
}
})
local conf = require('telescope.config').values
local function toggle_telescope(harpoon_files)
@@ -40,6 +48,29 @@ return {
{ desc = "Toggle quick menu." }
)
-- Buffer key maps. Currently keeping all buffer movements
-- isolated to top left row of keys on keyboard and all begin
-- with the <Control> key.
-- Select buffer numbers.
vim.keymap.set("n", "<C-y>",
function() harpoon:list():select(1) end,
{ desc = "Select first harpoon buffer." }
)
vim.keymap.set("n", "<C-u>",
function() harpoon:list():select(2) end,
{ desc = "Select second harpoon buffer." }
)
vim.keymap.set("n", "<C-i>",
function() harpoon:list():select(3) end,
{ desc = "Select third harpoon buffer." }
)
vim.keymap.set("n", "<C-o>",
function() harpoon:list():select(3) end,
{ desc = "Select third harpoon buffer." }
)
-- Toggle previous and next buffers.
vim.keymap.set("n", "<C-[>",
function() harpoon:list():prev() end,