descriptionEldoc displays the function signature of the closest function call around point either in the minibuffer or in the modeline.
ownernumbchild@gmail.com
last changeThu, 6 Apr 2023 09:59:08 +0000 (6 17:59 +0800)
content tags
add:
README.md

Screenshots

screenshot

eldoc-overlay

Eldoc displays the function signature of the closest function call around point either in the minibuffer or in the modeline. This package modifies Eldoc to display this documentation inline using a buffer text overlay.

eldoc-overlay-mode is a per-buffer minor mode.
A call to eldoc-overlay-enable turns it on.
A call to eldoc-overlay-disable turns it off

C-x C-h interactively calls eldoc-overlay-toggle and tells you the mode's new state.

global-eldoc-overlay-mode can be used to toggle this for all buffers.
A call to global-eldoc-overlay-enable turns it on.
A call to global-eldoc-overlay-disable turns it off

C-u C-x C-h interactively calls global-eldoc-overlay-toggle and tells you the mode's new state.

By default, the overlay is not used in the minibuffer, eldoc is shown in the modeline in this case. Set the option eldoc-overlay-in-minibuffer-flag non-nil if you want to enable overlay use in the minibuffer.

The key used to toggle the mode can be customized by setting the eldoc-overlay-key option.

Installation

(use-package eldoc-overlay
  :ensure t
  :init (eldoc-overlay-mode 1))

Configuration

An example config

(use-package eldoc-overlay
  :ensure t
  :delight eldoc-overlay-mode
  :custom ((eldoc-overlay-backend 'inline-docs)
           ;; (eldoc-overlay-delay 3)
           )
  :custom-face (inline-docs-border-face ((t (:family "DejaVu Sans Mono"))))
  :hook (eldoc-mode . eldoc-overlay-mode))

overlay display backend

Check out customize variable eldoc-overlay-backend.

overlay display delay

Check out customize variable eldoc-overlay-delay.

Usage

Eldoc displays the function signature of the closest function call around point either in the minibuffer or in the modeline.

This package modifies Eldoc to display this documentation inline using a buffer text overlay.

{C-x C-h} interactively calls `eldoc-overlay-toggle' and tells you the mode's new state.

{C-u C-x C-h} interactively calls global-eldoc-overlay-toggle and tells you the mode's new state.

By default, the overlay is not used in the minibuffer, eldoc is shown in the modeline in this case. Set the option eldoc-overlay-in-minibuffer-flag non-nil if you want to enable overlay use in the minibuffer.

The key used to toggle the mode can be customized by setting the eldoc-overlay-key option.

Finally, see the documentation for eldoc-overlay-backend if you want to try a different overlay display package backend.

Notices

Change log

break backward compatible upgrading changes

This source code originally came from an answer to justbur of this question.

shortlog
2023-04-06 stardivinermake eldoc-overlay-mode as a global minor modemaster
2022-10-07 stardivinerDon't use `eldoc-documentation-compose' strategy to...
2022-10-07 stardivinerFix eldoc-overlay-disable logic to follow new eldoc...
2022-10-05 stardivinerFix package-lint warnings
2022-10-05 stardivineradopt for new eldoc mechanism.
2022-10-04 stardivinerAdd Configuration section to README.md
2022-10-04 stardivinerAdd a tip of how to fix overlay border line exceeded...
2022-10-04 stardivinerImprove variable `eldoc-overlay-delay' docstring.
2022-02-10 stardivinerUpdate library homepage
2021-06-30 stardivinerChange eldoc-overlay-backend into a customizable option
2020-07-15 stardivinerremove minor-mode lighter
2020-07-15 stardivineradd eldoc-overlay display delay
2020-03-28 stardivinerfix format-string is not nil caused error
2020-03-27 stardivineradd inline-docs clear function
2020-03-27 stardivinerfix eldoc documentation function recursive invocation...
2020-03-22 stardivineradd autoload cookie for global-eldoc-overlay-mode
...
heads
19 months ago master