Skip to content

Adding certain Evil commands to ElDoc for better minibuffer help #1969

Open
@jamescherti

Description

@jamescherti

When using eldoc in conjunction with Evil mode in Emacs, ElDoc help disappears from the minibuffer after certain Evil commands are executed (e.g., commands like evil-delete-back-to-indentation, evil-delete-backward-word, evil-insert, evil-insert-line, evil-append, and evil-append-line... are not automatically included in ElDoc's help system.)

Suggested Solution

To improve the ElDoc experience for Evil mode users, adding the following commands to the evil package will fix the issue:

;; Includes:
;;   - 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")

;; When the user switches to insert mode
(eldoc-add-command 'evil-insert)
(eldoc-add-command 'evil-insert-line)
(eldoc-add-command 'evil-append)
(eldoc-add-command 'evil-append-line)

After adding these commands to eldoc-add-command, users will receive meaningful ElDoc messages for these Evil commands.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions