diff options
Diffstat (limited to '.config/nvim/lua/plugins/harpoon.lua')
| -rw-r--r-- | .config/nvim/lua/plugins/harpoon.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/.config/nvim/lua/plugins/harpoon.lua b/.config/nvim/lua/plugins/harpoon.lua new file mode 100644 index 0000000..9ca692f --- /dev/null +++ b/.config/nvim/lua/plugins/harpoon.lua @@ -0,0 +1,22 @@ +return { + "ThePrimeagen/harpoon", + branch = "harpoon2", + dependencies = { "nvim-lua/plenary.nvim" }, + config = function() + local harpoon = require "harpoon" + harpoon:setup() + + vim.keymap.set("n", "<m-h><m-m>", function() + harpoon:list():add() + end) + vim.keymap.set("n", "<m-h><m-l>", function() + harpoon.ui:toggle_quick_menu(harpoon:list()) + end) + + for _, idx in ipairs { 1, 2, 3, 4, 5 } do + vim.keymap.set("n", string.format("<space>%d", idx), function() + harpoon:list():select(idx) + end) + end + end, +} |
