diff options
Diffstat (limited to '')
-rw-r--r-- | hm/soispha/conf/nvim/plgs/harpoon/default.nix | 67 |
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; }; } |