aboutsummaryrefslogtreecommitdiffstats
path: root/hm/soispha/conf/nvim/plgs/harpoon
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-10-08 13:12:44 +0200
committerSoispha <soispha@vhack.eu>2023-10-08 13:12:44 +0200
commit8fbcfc8698f97fc4701d09cb3de3e095d5ddd7c7 (patch)
tree90530153a36e969569115c6e06ea17c473826670 /hm/soispha/conf/nvim/plgs/harpoon
parentchore(version): v1.15.0 (diff)
downloadnixos-config-8fbcfc8698f97fc4701d09cb3de3e095d5ddd7c7.zip
fix(hm/conf/nvim): Update to new keymap format
Diffstat (limited to 'hm/soispha/conf/nvim/plgs/harpoon')
-rw-r--r--hm/soispha/conf/nvim/plgs/harpoon/default.nix67
1 files changed, 35 insertions, 32 deletions
diff --git a/hm/soispha/conf/nvim/plgs/harpoon/default.nix b/hm/soispha/conf/nvim/plgs/harpoon/default.nix
index ecd1d6cb..76f33af8 100644
--- a/hm/soispha/conf/nvim/plgs/harpoon/default.nix
+++ b/hm/soispha/conf/nvim/plgs/harpoon/default.nix
@@ -6,16 +6,14 @@
number,
desc_template,
}: {
- name = "${prefix}${number}";
- value = {
- action = ''
- function()
- ${command_template number}
- end
- '';
- lua = true;
- desc = "${desc_template number}";
- };
+ key = "${prefix}${number}";
+ action = ''
+ function()
+ ${command_template number}
+ end
+ '';
+ lua = true;
+ options.desc = "${desc_template number}";
};
mkGotoTerminalCommand = number: let
desc_template = number: "Goto terminal number ${number}";
@@ -30,8 +28,8 @@
in
mkNumberedCommand {inherit desc_template command_template prefix number;};
- gotoTerminalMappings = builtins.listToAttrs (builtins.map mkGotoTerminalCommand numbers);
- gotoFileMappings = builtins.listToAttrs (builtins.map mkGotoFileCommand numbers);
+ gotoTerminalMappings = builtins.map mkGotoTerminalCommand numbers;
+ gotoFileMappings = builtins.map mkGotoFileCommand numbers;
in {
programs.nixvim = {
plugins.harpoon = {
@@ -41,55 +39,60 @@ in {
tmuxGotoTerminal = null; # TODO:
};
};
- maps.normalVisualOp =
- {
- "-" = {
+ keymaps =
+ [
+ {
+ key = "-";
action = ''
function()
require("harpoon.ui").nav_next()
end
'';
lua = true;
- desc = "go to the next marked file";
- };
- "_" = {
+ options.desc = "go to the next marked file";
+ }
+ {
+ key = "_";
action = ''
function()
require("harpoon.ui").nav_prev()
end
'';
lua = true;
- desc = "go to the previous marked file";
- };
- "<leader><leader>" = {
+ options.desc = "go to the previous marked file";
+ }
+ {
+ key = "<leader><leader>";
action = ''
function()
require("harpoon.mark").add_file()
end
'';
lua = true;
- desc = "add a mark to the open file in harpoon.";
- };
- "gqc" = {
+ options.desc = "add a mark to the open file in harpoon.";
+ }
+ {
+ key = "gqc";
action = ''
function()
require("harpoon.cmd-ui").toggle_quick_menu()
end
'';
lua = true;
- desc = "toggle the harpoon command quick menu to see all commands.";
- };
- "<leader>q" = {
+ options.desc = "toggle the harpoon command quick menu to see all commands.";
+ }
+ {
+ key = "<leader>q";
action = ''
function()
require("harpoon.ui").toggle_quick_menu()
end
'';
lua = true;
- desc = "toggle the harpoon normal quick menu to see all marks.";
- };
- }
- // gotoFileMappings
- // gotoTerminalMappings;
+ options.desc = "toggle the harpoon normal quick menu to see all marks.";
+ }
+ ]
+ ++ gotoFileMappings
+ ++ gotoTerminalMappings;
};
}