{ nix2lua, vim, ... }: with nix2lua.lib; let hintDirAfter = var "hint.HintDirection.AFTER_CURSOR"; hintDirBefore = var "hint.HintDirection.BEFORE_CURSOR"; defaultKeymaps = [ { mode = ""; bind = "hc"; command = "HopChar1"; } { mode = ""; bind = "hf"; command = lambda0 (call "hop.hint_char1" { direction = hintDirAfter; current_line_only = true; }); } { mode = ""; bind = "hF"; command = lambda0 (call "hop.hint_char1" { direction = hintDirBefore; current_line_only = true; }); } { mode = ""; bind = "hbc"; command = lambda0 (call "hop.hint_char1" { direction = hintDirAfter; }); } { mode = ""; bind = "htc"; command = lambda0 (call "hop.hint_char1" { direction = hintDirBefore; }); } { mode = ""; bind = "hw"; command = "HopWord"; } { mode = ""; bind = "hbw"; command = lambda0 (call "hop.hint_words" { direction = hintDirAfter; }); } { mode = ""; bind = "htw"; command = lambda0 (call "hop.hint_words" { direction = hintDirBefore; }); } { mode = ""; bind = "hp"; command = "HopPattern"; } { mode = ""; bind = "hbp"; command = lambda0 (call "hop.hint_patterns" { direction = hintDirAfter; }); } { mode = ""; bind = "htp"; command = lambda0 (call "hop.hint_patterns" { direction = hintDirBefore; }); } { mode = ""; bind = "hbv"; command = lambda0 (call "hop.hint_vertical" { direction = hintDirAfter; }); } { mode = ""; bind = "htv"; command = lambda0 (call "hop.hint_vertical" { direction = hintDirBefore; }); } ]; in { configs ? { } , keymaps ? defaultKeymaps , extraKeymaps ? [ ] }: { hop-nvim = [ (local (set "hop" (require "hop"))) (pipe1 (var "hop") (call "setup" configs)) (local (set "hint" (require "hop.hint"))) ] ++ map vim.keymap.set (keymaps ++ extraKeymaps); }