Function: nerd-icons-icon-for-buffer
nerd-icons-icon-for-buffer is a byte-compiled function defined in
nerd-icons.el.
Signature
(nerd-icons-icon-for-buffer &rest ARG-OVERRIDES)
Documentation
Get the formatted icon for the current buffer.
ARG-OVERRIDES should be a plist containing :height,
:v-adjust or :face properties like in the normal icon
inserting functions.
This function prioritises the use of the buffers file extension to
discern the icon when its major-mode matches its auto mode,
otherwise it will use the buffers major-mode to decide its
icon.
Implementations
(nerd-icons-icon-for-buffer &rest ARG-OVERRIDES) in `nerd-icons.el'.
Undocumented
Source Code
;; Defined in /nix/store/yazcqi510kxs7jygyiirgf8qyg348f6p-emacs-packages-deps/share/emacs/site-lisp/elpa/nerd-icons-20260823.17/nerd-icons.el
;;;###autoload
(cl-defgeneric nerd-icons-icon-for-buffer (&rest arg-overrides)
"Get the formatted icon for the current buffer.
ARG-OVERRIDES should be a plist containing `:height',
`:v-adjust' or `:face' properties like in the normal icon
inserting functions.
This function prioritises the use of the buffers file extension to
discern the icon when its `major-mode' matches its auto mode,
otherwise it will use the buffers `major-mode' to decide its
icon."
(if (and (buffer-file-name)
(nerd-icons-auto-mode-match?))
(apply #'nerd-icons-icon-for-file (file-name-nondirectory (buffer-file-name)) arg-overrides)
(apply #'nerd-icons-icon-for-mode major-mode arg-overrides)))