NonGNU-devel ELPA - eldoc-mouse

eldoc-mouse Atom Feed

Description
Display documentation for mouse hover
Latest
eldoc-mouse-3.0.0.20251219.110114.tar (.sig), 2025-Dec-21, 70.0 KiB
Maintainer
Huang Feiyu <sibadake1@163.com>
Website
https://github.com/huangfeiyu/eldoc-mouse
Browse ELPA's repository
CGit or Gitweb
Badge

To install this package from Emacs, use package-install or list-packages.

Full description

This package enhances `eldoc' by displaying documentation in a child frame
when the mouse hovers over a symbol.  It integrates with `posframe' for popup
documentation.  Enable it in buffers that you want to show documentation using
eldoc for the symbol under the mouse cursor.

To use, ensure posframe is installed, then add the following:

  (use-package eldoc-mouse :ensure t
    ;; replace <f1> <f1> to a key you like, "C-h ." maybe.
    ;; Displaying document on a popup when you press a key.
    :bind (:map eldoc-mouse-mode-map
           ("<f1> <f1>" . eldoc-mouse-pop-doc-at-cursor)) ;; optional
    ;; enable mouse hover for eglot managed buffers, and Emacs Lisp buffers (optional)
    :hook (eglot-managed-mode emacs-lisp-mode))

Or if you simply want to enable mouse hover for all buffers where
eldoc-mode is available as a minor mode, then:

  (use-package eldoc-mouse :ensure t
    ;; replace <f1> <f1> to a key you like, "C-h ." maybe.  Displaying document on a popup when you press a key.
    :bind (:map eldoc-mouse-mode-map
           ("<f1> <f1>" . eldoc-mouse-pop-doc-at-cursor)) ;; optional
    :hook eldoc-mode)

Or if you want to show document only when you press a key, and
don't want to enable mouse hover, then:

  (use-package eldoc-mouse :ensure t)
  ;; replace <f1> <f1> to a key you like.  Displaying document on a popup when you press a key.
  (global-set-key (kbd "<f1> <f1>") 'eldoc-mouse-pop-doc-at-cursor)

to your Emacs configuration.