corfu-doc - Documentation popup for Corfu
Important: this package has been merged into Corfu as one of its extensions under the name corfu-popupinfo. And this repository is deprecated now.
Introduction
Display a documentation popup for completion candidate when using Corfu.
It can be regarded as company-quickhelp
for Corfu.
Installation
Corfu-doc is available from MELPA, and can be
installed via package-install
. You can also manually install it via
package-install-file
.
Enable it with M-x corfu-doc-mode
or by using corfu-mode-hook
:
(add-hook 'corfu-mode-hook #'corfu-doc-mode)
Scroll the documentation
Bind keys M-p
and M-n
to commands corfu-doc-scroll-down
and
corfu-doc-scroll-up
to scroll the documentation.
(define-key corfu-map (kbd "M-p") #'corfu-doc-scroll-down) ;; corfu-next
(define-key corfu-map (kbd "M-n") #'corfu-doc-scroll-up) ;; corfu-previous
Quickly toggle the documentation on or off
Bind a key to quickly toggle the documentation popup on or off.
(define-key corfu-map (kbd "M-d") #'corfu-doc-toggle)
Display the doc frame beyond the parent frame
The doc frame is displayed within the parent frame by default.
However, the position of the doc frame can be calculated base on the size of
the display monitor if corfu-doc-display-within-parent-frame
is set to nil
.
Most window-systems clip a child frame at the native edges (see Frame Geometry) of its parent frame—everything outside these edges is usually invisible…
NS builds do not clip child frames at the parent frame’s edges, allowing them to be positioned so they do not obscure the parent frame while still being visible themselves.
Please see “(elisp) Child Frames” in Emacs manual for details.
Contributions
This package will be packaged into corfu in the future as an extension(#8), contributions require a copyright assignment to the FSF.
License
GPLv3