diff options
Diffstat (limited to 'fnl/config/hop.fnl')
-rw-r--r-- | fnl/config/hop.fnl | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fnl/config/hop.fnl b/fnl/config/hop.fnl index f623c0f..9dd3d10 100644 --- a/fnl/config/hop.fnl +++ b/fnl/config/hop.fnl @@ -4,5 +4,19 @@ (let [hop (util.load-plugin :hop)] (hop.setup {})) +(def- opts {:noremap true :silent true}) + (nvim.set_keymap :n :s ":HopChar2<cr>" {:silent true}) (nvim.set_keymap :n :S ":HopWord<cr>" {:silent true}) +(nvim.set_keymap :o :f + ":lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.AFTER_CURSOR, current_line_only = true })<CR>" + opts) +(nvim.set_keymap :o :F + ":lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.BEFORE_CURSOR, current_line_only = true })<CR>" + opts) +(nvim.set_keymap :o :t + ":lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.AFTER_CURSOR, current_line_only = true, hint_offset = -1 })<CR>" + opts) +(nvim.set_keymap :o :T + ":lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.BEFORE_CURSOR, current_line_only = true, hint_offset = 1 })<CR>" + opts) |