Variable: corfu-margin-formatters
corfu-margin-formatters is a customizable variable defined in
corfu.el.
Value
nil
Documentation
Registry for margin formatter functions.
Each function of the list is called with the completion metadata as argument until an appropriate formatter is found. The function should return a formatter function, which takes the candidate string and must return a string, possibly an icon. In order to preserve correct popup alignment, the length and display width of the returned string must precisely span the same number of characters of the fixed-width popup font. For example the kind-icon package returns a string of length 3 with a display width of 3 characters.
Source Code
;; Defined in ~/.emacs.d/elpa/corfu-20260813.950/corfu.el
(defcustom corfu-margin-formatters nil
"Registry for margin formatter functions.
Each function of the list is called with the completion metadata as
argument until an appropriate formatter is found. The function should
return a formatter function, which takes the candidate string and must
return a string, possibly an icon. In order to preserve correct popup
alignment, the length and display width of the returned string must
precisely span the same number of characters of the fixed-width popup
font. For example the kind-icon package returns a string of length 3
with a display width of 3 characters."
:type 'hook)