{ lib, config, ... }: let cfg = config.soispha.programs.nvim; in { home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { plugins.harpoon.enable = true; keymaps = lib.mapAttrsToList (key: action: { mode = "n"; inherit key; action.__raw = builtins.elemAt action 0; options.silent = true; options.desc = builtins.elemAt action 1; }) { # add current file "" = [ # lua '' function() require("harpoon"):list():add() end '' "Add a mark to the open file in harpoon." ]; # open menu "q" = [ # lua '' function() require("harpoon").ui:toggle_quick_menu(require("harpoon"):list()) end '' "Toggle the harpoon normal quick menu to see all marks." ]; }; }; }