diff --git a/nvim/m-housh/lua/user/plugin/harpoon.lua b/nvim/m-housh/lua/user/plugin/harpoon.lua index 5f9ba34..0bc0834 100644 --- a/nvim/m-housh/lua/user/plugin/harpoon.lua +++ b/nvim/m-housh/lua/user/plugin/harpoon.lua @@ -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 key. + + -- Select buffer numbers. + vim.keymap.set("n", "", + function() harpoon:list():select(1) end, + { desc = "Select first harpoon buffer." } + ) + vim.keymap.set("n", "", + function() harpoon:list():select(2) end, + { desc = "Select second harpoon buffer." } + ) + vim.keymap.set("n", "", + function() harpoon:list():select(3) end, + { desc = "Select third harpoon buffer." } + ) + vim.keymap.set("n", "", + function() harpoon:list():select(3) end, + { desc = "Select third harpoon buffer." } + ) + + -- Toggle previous and next buffers. vim.keymap.set("n", "", function() harpoon:list():prev() end,