rainstormstudio / treemacs-nerd-icons

GNU General Public License v3.0
19 stars 10 forks source link

Custom regexes from nerd-icons are not respected #2

Open bricka opened 1 year ago

bricka commented 1 year ago

I have made a custom entry in my nerd-icons configuration:

(use-package nerd-icons
  :config
  (add-to-list 'nerd-icons-regexp-icon-alist '("^gradlew\\(.bat\\)?$" nerd-icons-sucicon "nf-seti-gradle" :face nerd-icons-silver)))

When I run nerd-icons-icon-for-file, I get this new icon: image

However, in my Treemacs, I still see the default icon: Screenshot 2023-05-05 at 11 54 46

I think that the reason is that https://github.com/rainstormstudio/treemacs-nerd-icons/blob/main/treemacs-nerd-icons.el#L51 is only copying the nerd-icons-extension-icon-alist list, and not nerd-icons-regexp-icon-alist.

Thanks!

rainstormstudio commented 1 year ago

yes the thing is treemacs does not support regexp for extension recognition. I think the best you can do is to add it to nerd-icons-extension-icon-alist without using regexp.