all-the-icons-nerd-fonts icon indicating copy to clipboard operation
all-the-icons-nerd-fonts copied to clipboard

Nerd font integration for all-the-icons

#+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.

  • Table of Contents :TOC:
  • [[#installation][Installation]]
    • [[#manually][Manually]]
    • [[#from-melpa][From MELPA]]
  • [[#usage][Usage]]
    • [[#example-config][Example Config]]
  • [[#appendix][Appendix]]
  • Installation ** Manually
    1. Clone the repo.
    2. Add the repo path to your emacs ~load-path~.
    3. Load it when needed.

** 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

  • Usage Requiring this package will setup all the ~all-the-icon~ font families for nerd fonts. You can call ~(all-the-icons-nerd-fonts-prefer)~ after requiring to make any existing all-the-icons configurations prefer nerd-fonts.

** 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

  • Appendix :ARCHIVE:

Local Variables:

eval: (toc-org-mode 1)

End:

LocalWords: nerd Config