diff options
| author | Simen A. W. Olsen <hello@simenandre.no> | 2024-12-27 15:14:23 +0100 |
|---|---|---|
| committer | Simen A. W. Olsen <hello@simenandre.no> | 2024-12-27 15:14:23 +0100 |
| commit | 9155cf33ed7533122666e193dad3f76e8a2b890f (patch) | |
| tree | 9fbe7d73810d5a0dacd8c9ddb4380f0620c2f600 /lua/simenandre/plugins/harpoon.lua | |
| parent | d8b6277d0915bc5a352f2ec1260866c74cfe2e55 (diff) | |
| download | config.nvim-9155cf33ed7533122666e193dad3f76e8a2b890f.tar.gz config.nvim-9155cf33ed7533122666e193dad3f76e8a2b890f.zip | |
add my nvim config
Diffstat (limited to 'lua/simenandre/plugins/harpoon.lua')
| -rw-r--r-- | lua/simenandre/plugins/harpoon.lua | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lua/simenandre/plugins/harpoon.lua b/lua/simenandre/plugins/harpoon.lua new file mode 100644 index 0000000..ee2dfdb --- /dev/null +++ b/lua/simenandre/plugins/harpoon.lua @@ -0,0 +1,31 @@ +return { + "ThePrimeagen/harpoon", + branch = "harpoon2", + requires = { + { "nvim-lua/plenary.nvim" }, + }, + config = function() + local harpoon = require("harpoon") + harpoon:setup() + + 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) + + for _, idx in ipairs({ 1, 2, 3, 4, 5 }) do + vim.keymap.set("n", string.format("<leader>%d", idx), function() + harpoon:list():select(idx) + end) + end + + vim.keymap.set("n", "<A-S-P>", function() + harpoon:list():prev() + end) + vim.keymap.set("n", "<A-S-N>", function() + harpoon:list():next() + end) + end, +} |
