From 1f2e89a01185079ecf292cefb7d5f161b4984750 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Tue, 5 Jul 2022 20:56:19 +0200 Subject: Add hop configs from Chris --- fnl/config/hop.fnl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'fnl') 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" {:silent true}) (nvim.set_keymap :n :S ":HopWord" {:silent true}) +(nvim.set_keymap :o :f + ":lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.AFTER_CURSOR, current_line_only = true })" + opts) +(nvim.set_keymap :o :F + ":lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.BEFORE_CURSOR, current_line_only = true })" + 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 })" + 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 })" + opts) -- cgit v1.2.3-70-g09d2