diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-07-05 20:56:19 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-07-05 20:56:19 +0200 |
commit | 1f2e89a01185079ecf292cefb7d5f161b4984750 (patch) | |
tree | 000bba907f24695088186de533c4799669137dba /fnl | |
parent | d0a76f4574313e004606d11deba2f50f0417fa9d (diff) |
Add hop configs from Chris
Diffstat (limited to '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) |