Function: marginalia-mode
marginalia-mode is an autoloaded, interactive and byte-compiled
function defined in marginalia.el.
Signature
(marginalia-mode &optional ARG)
Documentation
Annotate completion candidates with richer information.
This is a global minor mode. If called interactively, toggle the
Marginalia mode mode. If the prefix argument is positive,
enable the mode, and if it is zero or negative, disable the mode.
If called from Lisp, toggle the mode if ARG is toggle. Enable
the mode if ARG is nil, omitted, or is a positive number.
Disable the mode if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
evaluate (default-value \=marginalia-mode)'.
The mode's hook is called both when the mode is enabled and when it is disabled.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/marginalia-20260724.810/marginalia.el
;;;###autoload
(define-minor-mode marginalia-mode
"Annotate completion candidates with richer information."
:global t :group 'marginalia
(if marginalia-mode
(progn
;; Remember `this-command' in order to select the annotation function.
(add-hook 'minibuffer-setup-hook #'marginalia--minibuffer-setup)
;; Replace the metadata function.
(advice-add (compat-function completion-metadata-get) :before-until #'marginalia--completion-metadata-get)
(advice-add #'completion-metadata-get :before-until #'marginalia--completion-metadata-get)
;; Record completion base position, for `marginalia--full-candidate'
(advice-add #'completion-all-completions :filter-return #'marginalia--base-position))
(advice-remove #'completion-all-completions #'marginalia--base-position)
(advice-remove (compat-function completion-metadata-get) #'marginalia--completion-metadata-get)
(advice-remove #'completion-metadata-get #'marginalia--completion-metadata-get)
(remove-hook 'minibuffer-setup-hook #'marginalia--minibuffer-setup)))