1

I'm new to emacs and installed the nerd-icons.el package along with the package nerd-icons dired. The problem is I don't like the icons set as default. Even though i've read the nerd-icons GitHub page, it isn't clear to me what to do. Given the link below how do I customize the nerd-icons used?

https://github.com/rainstormstudio/nerd-icons.el

Here is a copy of my init file

      (use-package nerd-icons
          :custom
          ;; The Nerd Font you want to use in GUI
          ;; "Symbols Nerd Font Mono" is the default and is recommended
          ;; but you can use any other Nerd Font if you want
          (nerd-icons-font-family "Symbols Nerd Font Mono"))
        
         Use nerdicons in buffer switcher
         (use-package nerd-icons-ibuffer
          :ensure t
          :hook (ibuffer-mode . nerd-icons-ibuffer-mode))
        
        
        ;; Adds icon for  dired
        (use-package nerd-icons-dired
          :hook
          (dired-mode . nerd-icons-dired-mode))
        
        (insert (nerd-icons-devicon "nf-dev-git")) ; git-file icon
        (insert (nerd-icons-devicon "nf-dev-git_branch")) ; git-branch icon
        (insert (nerd-icons-devicon "nf-dev-git_commit")) ; git-commit icon
        (insert (nerd-icons-devicon "nf-dev-git_compare")) ; git-compare icon
        (insert (nerd-icons-devicon "nf-dev-git_merge")) ; git-merge icon
        (insert (nerd-icons-devicon "nf-dev-git_pull_request")); pull-request icon

EDIT:

I've posted the issue on GitHub as suggested in a comment: https://github.com/rainstormstudio/nerd-icons.el/issues/68

2
  • 1
    I'd suggest opening an issue at the GitHub site: they are much more likely to be able to answer your question.
    – NickD
    Commented Dec 28, 2023 at 17:21
  • 1
    I incorporated the information from your "answer" into your question. If and when you get a satisfactory answer on your issue, then you might want to provide an answer here as well, explaining what to do. In the meantime, I agree with @Drew: your "answer" is no such thing, so you should delete it.
    – NickD
    Commented Dec 29, 2023 at 4:22

1 Answer 1

0

Answer given to me based on the GitHub Issue posted above

All I needed to do to customize the nerd-icons was to add an icon alist based on the context of its use. That being for extensions, directories, or modes, which map to the provided functions nerd-icons-extension-icon-alist, nerd-icons-dir-icon-alist and nerd-icons-mode-icon-alist, etc.

The example below:

(add-to-list 'nerd-icons-extension-icon-alist
             '("epub" nerd-icons-faicon "nf-fa-book" :face nerd-icons-green))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.