aboutsummaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/plugins/harpoon.lua
diff options
context:
space:
mode:
authorSimen A. W. Olsen <so@bjerk.io>2023-12-27 00:41:12 +0100
committerSimen A. W. Olsen <so@bjerk.io>2023-12-27 00:41:12 +0100
commit891fad07f520115bb2f44c8e9ed45726a465e3a5 (patch)
tree90224e9c4eae25b63248b7266cd0bfbc302e9bc8 /.config/nvim/lua/plugins/harpoon.lua
parent4a2edf5a0f86ce3be0f8124cdb4dcad788f4784e (diff)
downloaddotfiles-891fad07f520115bb2f44c8e9ed45726a465e3a5.tar.gz
dotfiles-891fad07f520115bb2f44c8e9ed45726a465e3a5.zip
more vim and hammerspoon
Diffstat (limited to '.config/nvim/lua/plugins/harpoon.lua')
-rw-r--r--.config/nvim/lua/plugins/harpoon.lua34
1 files changed, 34 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..797392d
--- /dev/null
+++ b/.config/nvim/lua/plugins/harpoon.lua
@@ -0,0 +1,34 @@
+return {
+ "ThePrimeagen/harpoon",
+ branch = "harpoon2",
+ requires = {
+ { "nvim-lua/plenary.nvim" },
+ },
+ config = function()
+ local harpoon = require("harpoon")
+
+ -- REQUIRED
+ harpoon:setup()
+ -- REQUIRED
+
+ vim.keymap.set("n", "<leader>a", function()
+ harpoon:list():append()
+ end)
+ vim.keymap.set("n", "<C-e>", function()
+ harpoon.ui:toggle_quick_menu(harpoon:list())
+ end)
+
+ vim.keymap.set("n", "<C-h>", function()
+ harpoon:list():select(1)
+ end)
+ vim.keymap.set("n", "<C-j>", function()
+ harpoon:list():select(2)
+ end)
+ vim.keymap.set("n", "<C-k>", function()
+ harpoon:list():select(3)
+ end)
+ vim.keymap.set("n", "<C-l>", function()
+ harpoon:list():select(4)
+ end)
+ end,
+}