mohkale / all-the-icons-nerd-fonts

Nerd font integration for all-the-icons
GNU General Public License v3.0
36 stars 2 forks source link

+TITLE: all-the-icons-nerd-fonts

+AUTHOR: Mohsin Kaleem

+html:

+html: MELPA

+html:

A bridge between [[https://github.com/domtronn/all-the-icons.el][all-the-icons]] and [[https://github.com/twlz0ne/nerd-icons.el][nerd-icons]].

This package defines a bunch of all-the-icons families for the various nerd-fonts. This means you can use ~all-the-icons-nerd-fa~ to insert a font-awesome icon through nerd-fonts just like you would with ~all-the-icons-faicon~. Furthermore this package defines a helper function to convert references to all-the-icons icons to equivalent or similar enough nerd-fonts icons.

Why? Because nerd-fonts has a greater coverage than all-the-icons and all-the-icons may repeat glyphs across font sets. The latter point isn't a problem on GUI emacs frames but on terminal frames because a glyph can only ever be drawn from a single font, there's chance that different icons from different families but using the same glyph aren't rendered the way their supposed to be. With nerd-fonts each icon has a unique glyph which prevents this issue.

** From MELPA This package is on [[https://github.com/melpa/melpa][MELPA]]. You can add this to your ~package-archives~ variable and then install through ~M-x package-install~.

+begin_src emacs-lisp

 (push '("melpa" . "https://melpa.org/packages/") package-archives)
 (package-refresh-contents)
 (package-install 'all-the-icons-nerd-fonts)

+end_src

** Example Config

+begin_src emacs-lisp

 (use-package all-the-icons-nerd-fonts
   :straight
   (all-the-icons-nerd-fonts :host github :repo "mohkale/all-the-icons-nerd-fonts")
   :after all-the-icons
   :demand t
   :config
   (all-the-icons-nerd-fonts-prefer))

+end_src

Local Variables:

eval: (toc-org-mode 1)

End:

LocalWords: nerd Config