How do I customize the icons used in nerd-icons package?
ScriptMang opened this issue · comments
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 readme, it isn't clear to me what to do.
How do I change the preset icons for a for a file extension.
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
Try customizing nerd-icons-extension-icon-alist
, nerd-icons-dir-icon-alist
and nerd-icons-mode-icon-alist
, etc.
e.g.
(add-to-list 'nerd-icons-extension-icon-alist '("epub" ners-icons-faicon "nf-fa-book" :face nerd-icons-green))
it works, thanks so much. Can this example be added to the readme to close off this issue.