Variable: nerd-icons-corfu-mapping
nerd-icons-corfu-mapping is a customizable variable defined in
nerd-icons-corfu.el.
Value
Large value
((array :style "cod" :icon "symbol_array" :face font-lock-type-face)
(boolean :style "cod" :icon "symbol_boolean" :face
font-lock-builtin-face)
(class :style "cod" :icon "symbol_class" :face font-lock-type-face)
(color :style "cod" :icon "symbol_color" :face success)
(command :style "cod" :icon "terminal" :face default)
(constant :style "cod" :icon "symbol_constant" :face
font-lock-constant-face)
(constructor :style "cod" :icon "triangle_right" :face
font-lock-function-name-face)
(enummember :style "cod" :icon "symbol_enum_member" :face
font-lock-builtin-face)
(enum-member :style "cod" :icon "symbol_enum_member" :face
font-lock-builtin-face)
(enum :style "cod" :icon "symbol_enum" :face font-lock-builtin-face)
(event :style "cod" :icon "symbol_event" :face font-lock-warning-face)
(field :style "cod" :icon "symbol_field" :face
font-lock-variable-name-face)
(file :fn nerd-icons-icon-for-file)
(folder :fn nerd-icons-icon-for-dir)
(interface :style "cod" :icon "symbol_interface" :face
font-lock-type-face)
(keyword :style "cod" :icon "symbol_keyword" :face
font-lock-keyword-face)
(macro :style "cod" :icon "symbol_misc" :face font-lock-keyword-face)
(magic :style "cod" :icon "wand" :face font-lock-builtin-face)
(method :style "cod" :icon "symbol_method" :face
font-lock-function-name-face)
(function :style "cod" :icon "symbol_method" :face
font-lock-function-name-face)
(module :style "cod" :icon "file_submodule" :face elisp-feature)
(numeric :style "cod" :icon "symbol_numeric" :face
font-lock-builtin-face)
(operator :style "cod" :icon "symbol_operator" :face
font-lock-comment-delimiter-face)
(param :style "cod" :icon "symbol_parameter" :face default)
(property :style "cod" :icon "symbol_property" :face
font-lock-variable-name-face)
(reference :style "cod" :icon "references" :face
font-lock-variable-name-face)
(snippet :style "cod" :icon "symbol_snippet" :face
font-lock-string-face)
(string :style "cod" :icon "symbol_string" :face
font-lock-string-face)
(struct :style "cod" :icon "symbol_structure" :face
font-lock-variable-name-face)
(text :style "cod" :icon "text_size" :face font-lock-doc-face)
(typeparameter :style "cod" :icon "list_unordered" :face
font-lock-type-face)
(type-parameter :style "cod" :icon "list_unordered" :face
font-lock-type-face)
(unit :style "cod" :icon "symbol_ruler" :face font-lock-constant-face)
(value :style "cod" :icon "symbol_field" :face font-lock-builtin-face)
(variable :style "cod" :icon "symbol_variable" :face
font-lock-variable-name-face))
Documentation
Mapping of completion kinds to icons.
There are two possible types for the values of this alist, static icon parameters or a custom function that should receive the completion candidate and return the icon.
From here on, KIND is a symbol determining what the completion is, and comes from calling the :company-kind property of the completion. The special t symbol should be used for KIND to represent the default icon, and must be present. This applies to both element variants.
In the first case, the elements should have the form (KIND :style ICON-STY :icon
ICON-NAME [:face FACE]). ICON-STY is a string with the icon style to use, from
those available in Nerd Fonts. ICON-NAME is a string with the name of the icon.
FACE, if present, is applied to the icon, mainly for its color. The face of the
final icon chosen is the result of composing FACE with what nerd-icons already
propertizes into the icon, because otherwise one may override the other. Thus,
the property's form will be something like
(FACE :family "Your Symbols Font" ...).
In case of more complex customizations that need to know the completion candidate itself, one can use a mapping like (KIND :fn ICON-FN [:face FACE]), and ICON-FN will be called with the candidate to return the icon. In this case, if FACE is present, it will be added to the returned icon unconditionally. Thus, if the face depends on the candidate as well, FACE should be absent and ICON-FN should return a propertized string.
In previous versions of this package, a mapping for KIND t was required to be present in the list, but it's been made optional, and removed from the default value. When absent, kinds that match no entry will default to a ? symbol. If you encounter ? as the icon, it's likely either your completion provider doesn't set a :company-kind property or you need to add an entry to this list. If you add a mapping for t, then ? will never be shown, and whatever you set as the icon for that becomes an indication of missing KIND entries.
Source Code
;; Defined in /nix/store/ky28nmc5qmvi3lsiyb1z1s7r517z21y6-emacs-packages-deps/share/emacs/site-lisp/elpa/nerd-icons-corfu-20260904.1927/nerd-icons-corfu.el
(defcustom nerd-icons-corfu-mapping
'((array :style "cod" :icon "symbol_array" :face font-lock-type-face)
(boolean :style "cod" :icon "symbol_boolean" :face font-lock-builtin-face)
(class :style "cod" :icon "symbol_class" :face font-lock-type-face)
(color :style "cod" :icon "symbol_color" :face success)
(command :style "cod" :icon "terminal" :face default)
(constant :style "cod" :icon "symbol_constant" :face font-lock-constant-face)
(constructor :style "cod" :icon "triangle_right" :face font-lock-function-name-face)
(enummember :style "cod" :icon "symbol_enum_member" :face font-lock-builtin-face)
(enum-member :style "cod" :icon "symbol_enum_member" :face font-lock-builtin-face)
(enum :style "cod" :icon "symbol_enum" :face font-lock-builtin-face)
(event :style "cod" :icon "symbol_event" :face font-lock-warning-face)
(field :style "cod" :icon "symbol_field" :face font-lock-variable-name-face)
(file :fn nerd-icons-icon-for-file)
(folder :fn nerd-icons-icon-for-dir)
(interface :style "cod" :icon "symbol_interface" :face font-lock-type-face)
(keyword :style "cod" :icon "symbol_keyword" :face font-lock-keyword-face)
(macro :style "cod" :icon "symbol_misc" :face font-lock-keyword-face)
(magic :style "cod" :icon "wand" :face font-lock-builtin-face)
(method :style "cod" :icon "symbol_method" :face font-lock-function-name-face)
(function :style "cod" :icon "symbol_method" :face font-lock-function-name-face)
(module :style "cod" :icon "file_submodule" :face elisp-feature)
(numeric :style "cod" :icon "symbol_numeric" :face font-lock-builtin-face)
(operator :style "cod" :icon "symbol_operator" :face font-lock-comment-delimiter-face)
(param :style "cod" :icon "symbol_parameter" :face default)
(property :style "cod" :icon "symbol_property" :face font-lock-variable-name-face)
(reference :style "cod" :icon "references" :face font-lock-variable-name-face)
(snippet :style "cod" :icon "symbol_snippet" :face font-lock-string-face)
(string :style "cod" :icon "symbol_string" :face font-lock-string-face)
(struct :style "cod" :icon "symbol_structure" :face font-lock-variable-name-face)
(text :style "cod" :icon "text_size" :face font-lock-doc-face)
(typeparameter :style "cod" :icon "list_unordered" :face font-lock-type-face)
(type-parameter :style "cod" :icon "list_unordered" :face font-lock-type-face)
(unit :style "cod" :icon "symbol_ruler" :face font-lock-constant-face)
(value :style "cod" :icon "symbol_field" :face font-lock-builtin-face)
(variable :style "cod" :icon "symbol_variable" :face font-lock-variable-name-face))
"Mapping of completion kinds to icons.
There are two possible types for the values of this alist, static icon
parameters or a custom function that should receive the completion candidate and
return the icon.
From here on, KIND is a symbol determining what the completion is, and comes
from calling the `:company-kind' property of the completion. The special t
symbol should be used for KIND to represent the default icon, and must be
present. This applies to both element variants.
In the first case, the elements should have the form (KIND :style ICON-STY :icon
ICON-NAME [:face FACE]). ICON-STY is a string with the icon style to use, from
those available in Nerd Fonts. ICON-NAME is a string with the name of the icon.
FACE, if present, is applied to the icon, mainly for its color. The face of the
final icon chosen is the result of composing FACE with what `nerd-icons' already
propertizes into the icon, because otherwise one may override the other. Thus,
the property's form will be something like
`(FACE :family \"Your Symbols Font\" ...)'.
In case of more complex customizations that need to know the completion
candidate itself, one can use a mapping like (KIND :fn ICON-FN [:face FACE]),
and ICON-FN will be called with the candidate to return the icon. In this case,
if FACE is present, it will be added to the returned icon unconditionally.
Thus, if the face depends on the candidate as well, FACE should be absent and
ICON-FN should return a propertized string.
In previous versions of this package, a mapping for KIND t was required to be
present in the list, but it's been made optional, and removed from the default
value. When absent, kinds that match no entry will default to a ? symbol. If
you encounter ? as the icon, it's likely either your completion provider doesn't
set a `:company-kind' property or you need to add an entry to this list. If you
add a mapping for t, then ? will never be shown, and whatever you set as the
icon for that becomes an indication of missing KIND entries."
:type '(alist :key-type symbol :value-type (choice nerd-icons-corfu-icon-type nerd-icons-corfu-function-type))
:group 'nerd-icons-corfu)