File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 14
14
:hook (minemacs-build-functions . nerd-icons-install-fonts)
15
15
:config
16
16
; ; Show .m files as Matlab/Octave files (integral icon)
17
- (setcdr (assoc " m" nerd-icons-extension-icon-alist) '(nerd-icons-mdicon " nf-md-math_integral_box" :face nerd-icons-orange)))
17
+ (setcdr (assoc " m" nerd-icons-extension-icon-alist) '(nerd-icons-mdicon " nf-md-math_integral_box" :face nerd-icons-orange))
18
+ (defun +nerd-icons-icon (name &rest args)
19
+ " Generic function to get icons by NAME, with ARGS."
20
+ (if-let* ((variant (and (string-match " ^nf-\\ ([[:alnum:]]+\\ )-" name) (match-string 1 name)))
21
+ (fn (intern (format " nerd-icons-%s icon " variant)))
22
+ ((fboundp fn)))
23
+ (apply fn (cons name args))
24
+ (error " Cannot detect the function which provides %S " name))))
18
25
19
26
20
27
; ; A megapack of themes for Emacs
You can’t perform that action at this time.
0 commit comments