Variable: marginalia-mode-hook
marginalia-mode-hook is a customizable variable defined in
marginalia.el.
Value
nil
Documentation
Hook run after entering or leaving marginalia-mode(var)/marginalia-mode(fun).
No problems result if this variable is not bound.
add-hook automatically binds it. (This is true for all hook variables.)
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)))