Add custom evil lookup function

This commit is contained in:
Jeremy Dormitzer 2023-04-27 14:58:03 -04:00
parent d54241bbbe
commit ae26a51ec4

View File

@ -10,7 +10,16 @@
(evil-define-key 'motion 'global (evil-define-key 'motion 'global
"j" #'evil-next-visual-line "j" #'evil-next-visual-line
"k" #'evil-previous-visual-line) "k" #'evil-previous-visual-line)
(defun my-evil-lookup-func ()
"Context-aware `evil-lookup-func'"
(cond
((and (eq major-mode 'emacs-lisp-mode)
(thing-at-point 'symbol))
(helpful-symbol (intern (thing-at-point 'symbol))))
((eldoc--supported-p) (eldoc t))
((thing-at-point 'word) (consult-man (thing-at-point 'word t)))))
:custom :custom
(evil-lookup-func #'my-evil-lookup-func)
(evil-undo-system 'undo-fu) (evil-undo-system 'undo-fu)
(evil-split-window-below t) (evil-split-window-below t)
(evil-vsplit-window-right t)) (evil-vsplit-window-right t))