Ensure evil-easymotion is lazy-loaded

The evilem-create calls were pulling it in early, at startup.
This commit is contained in:
Henrik Lissner 2019-12-27 01:54:01 -05:00
parent e5602c1802
commit dcb0b6042e
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 15 additions and 8 deletions

View file

@ -97,7 +97,7 @@ the only window, use evil-window-move-* (e.g. `evil-window-move-far-left')."
"Invoke and lazy-load `evil-easymotion' without compromising which-key "Invoke and lazy-load `evil-easymotion' without compromising which-key
integration." integration."
(interactive) (interactive)
(evilem-default-keybindings "<easymotion>") (require 'evil-easymotion)
(setq prefix-arg current-prefix-arg) (setq prefix-arg current-prefix-arg)
(push '(t . easymotion) unread-command-events)) (push '(t . easymotion) unread-command-events))

View file

@ -210,6 +210,7 @@ directives. By default, this only recognizes C directives.")
(use-package! evil-easymotion (use-package! evil-easymotion
:commands evilem-create evilem-default-keybindings :commands evilem-create evilem-default-keybindings
:config :config
(evilem-default-keybindings "<easymotion>")
;; Use evil-search backend, instead of isearch ;; Use evil-search backend, instead of isearch
(evilem-make-motion evilem-motion-search-next #'evil-ex-search-next (evilem-make-motion evilem-motion-search-next #'evil-ex-search-next
:bind ((evil-ex-search-highlight-all nil))) :bind ((evil-ex-search-highlight-all nil)))
@ -557,14 +558,20 @@ To change these keys see `+evil-repeat-keys'."
:textobj "x" #'evil-inner-xml-attr #'evil-outer-xml-attr :textobj "x" #'evil-inner-xml-attr #'evil-outer-xml-attr
;; evil-easymotion ;; evil-easymotion
(:prefix "<easymotion>" ; see `+evil/easymotion' (:after evil-easymotion
"a" (evilem-create #'evil-forward-arg) (:prefix "<easymotion>" ; see `+evil/easymotion'
"A" (evilem-create #'evil-backward-arg) "a" (evilem-create #'evil-forward-arg)
"s" #'evil-avy-goto-char-2 "A" (evilem-create #'evil-backward-arg)
"SPC" (λ!! #'evil-avy-goto-char-timer t) "s" #'evil-avy-goto-char-2
"/" #'evil-avy-goto-char-timer) "w" (evilem-create #'evil-snipe-repeat
:pre-hook (save-excursion (call-interactively #'evil-snipe-f))
:bind ((evil-snipe-scope 'visible)
(evil-snipe-enable-highlight)
(evil-snipe-enable-incremental-highlight)))
"SPC" (λ!! #'evil-avy-goto-char-timer t)
"/" #'evil-avy-goto-char-timer))
;; evil-snipe ;; evil-snipe
(:after evil-snipe (:after evil-snipe
:map evil-snipe-parent-transient-map :map evil-snipe-parent-transient-map
"C-;" (λ! (require 'evil-easymotion) "C-;" (λ! (require 'evil-easymotion)