/all-the-icons-nerd-fonts

Nerd font integration for all-the-icons

Primary LanguageEmacs LispGNU General Public License v3.0GPL-3.0

all-the-icons-nerd-fonts

MELPA

A bridge between all-the-icons and 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

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 MELPA. You can add this to your package-archives variable and then install through M-x package-install.

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

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

(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))

Appendix