From 2bee8ebfd7a12af6851d45b746834437b5a3d8d3 Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Mon, 10 Feb 2025 11:22:08 +0100 Subject: [PATCH] Install harpoon. --- modules/home-manager/neovim.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/modules/home-manager/neovim.nix b/modules/home-manager/neovim.nix index 9a0726d..467c3c6 100644 --- a/modules/home-manager/neovim.nix +++ b/modules/home-manager/neovim.nix @@ -1,5 +1,6 @@ { config, + pkgs, lib, ... }: { @@ -136,6 +137,27 @@ desc = "Open Mini.Files and manage the filesystem."; } ]; + + extraPlugins = with pkgs.vimPlugins; { + harpoon = { + package = harpoon2; + setup = '' + local harpoon = require("harpoon") + + -- REQUIRED + harpoon:setup() + -- REQUIRED + + vim.keymap.set("n", "a", function() harpoon:list():add() end) + vim.keymap.set("n", "", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end) + + vim.keymap.set("n", "", function() harpoon:list():select(1) end) + vim.keymap.set("n", "", function() harpoon:list():select(2) end) + vim.keymap.set("n", "", function() harpoon:list():select(3) end) + vim.keymap.set("n", "", function() harpoon:list():select(4) end) + ''; + }; + }; }; }; };