diff options
| author | Simen A. W. Olsen <so@bjerk.io> | 2024-05-17 10:05:29 +0200 |
|---|---|---|
| committer | Simen A. W. Olsen <so@bjerk.io> | 2024-05-17 10:05:29 +0200 |
| commit | a2f43302e1524cc8fe38791e0fdc00a3695fb76b (patch) | |
| tree | e393d1789a8d4a444d18425229f0f778ceb7342e /.config/nvim/lua/simenandre/plugins | |
| parent | e0b3900d8b50b499a5527e0f6d3590649fd4cefb (diff) | |
| download | dotfiles-a2f43302e1524cc8fe38791e0fdc00a3695fb76b.tar.gz dotfiles-a2f43302e1524cc8fe38791e0fdc00a3695fb76b.zip | |
updates
Diffstat (limited to '.config/nvim/lua/simenandre/plugins')
| -rw-r--r-- | .config/nvim/lua/simenandre/plugins/harpoon.lua | 71 |
1 files changed, 32 insertions, 39 deletions
diff --git a/.config/nvim/lua/simenandre/plugins/harpoon.lua b/.config/nvim/lua/simenandre/plugins/harpoon.lua index dbdf096..3bd4896 100644 --- a/.config/nvim/lua/simenandre/plugins/harpoon.lua +++ b/.config/nvim/lua/simenandre/plugins/harpoon.lua @@ -1,44 +1,37 @@ return { - "ThePrimeagen/harpoon", - branch = "harpoon2", - requires = { - { "nvim-lua/plenary.nvim" }, - }, - config = function() - local harpoon = require("harpoon") + "ThePrimeagen/harpoon", + branch = "harpoon2", + requires = { + { "nvim-lua/plenary.nvim" }, + }, + config = function() + local harpoon = require("harpoon") + harpoon:setup() - -- REQUIRED - harpoon:setup() - -- REQUIRED + 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", "<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-j>", function() + -- harpoon:list():select(1) + -- end) + -- vim.keymap.set("n", "<C-k>", function() + -- harpoon:list():select(2) + -- end) + -- vim.keymap.set("n", "<C-l>", function() + -- harpoon:list():select(3) + -- end) + -- vim.keymap.set("n", "<C-[>", function() + -- harpoon:list():select(4) + -- end) - vim.keymap.set("n", "<C-j>", function() - harpoon:list():select(1) - end) - vim.keymap.set("n", "<C-k>", function() - harpoon:list():select(2) - end) - vim.keymap.set("n", "<C-l>", function() - harpoon:list():select(3) - end) - vim.keymap.set("n", "<C-[>", function() - harpoon:list():select(4) - end) - -- vim.keymap.set("n", "<C-[>", function() - -- harpoon:list():select(4) - -- end) - - 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, + 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 + end, } |
