Skip to content

Fixes #1969: Enhance ElDoc integration #1980

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion evil-integration.el
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,24 @@ Based on `evil-enclose-ace-jump-for-motion'."

;;; ElDoc
(eval-after-load 'eldoc
;; The following prevents ElDoc help from disappearing in the minibuffer when
;; executing certain Evil commands in Emacs, such as
;; `evil-delete-back-to-indentation', `evil-delete-backward-word',
;; `evil-insert', `evil-insert-line', `evil-append', `evil-append-line'...
'(when (fboundp 'eldoc-add-command-completions)
(eldoc-add-command-completions "evil-window-")))
(eldoc-add-command-completions "evil-window-")

;; Add evil-delete commands to ElDoc to display help while deleting using:
;; - evil-delete-backward-word (C-w)
;; - evil-delete-back-to-indentation (C-u)
;; - evil-delete-backward-char-and-join (C-h)
;; - And other evil-delete-* commands.
(eldoc-add-command-completions "evil-delete-")

;; Add insert and append commands to ElDoc to display help after switching
;; to insert mode.
(eldoc-add-command-completions "evil-insert-")
(eldoc-add-command-completions "evil-append-")))

;;; XRef
(eval-after-load 'xref
Expand Down