Skip to content

Configuration

The package is available from ELPA or MELPA. You can install the package with ‘package-install’. It is recommended to use Marginalia together with either the Vertico, Mct, Icomplete or the default completion UI. Furthermore Marginalia can be combined with Embark for action support and Consult, which provides many useful commands.

emacs-lisp
;; Enable rich annotations using the Marginalia package
(use-package marginalia
  ;; Bind `marginalia-cycle' locally in the minibuffer.  To make the binding
  ;; available in the *Completions* buffer, add it to the
  ;; `completion-list-mode-map'.
  :bind (:map minibuffer-local-map
         ("M-A" . marginalia-cycle))

  ;; The :init section is always executed.
  :init

  ;; Marginalia must be activated in the :init section of use-package such that
  ;; the mode gets enabled right away. Note that this forces loading the
  ;; package.
  (marginalia-mode))