🔣 nerdfix helps you to find/fix obsolete Nerd Font icons in your project.

Overview

🔣 nerdfix

GitHub release GitHub Workflow Status

nerdfix helps you to find/fix obsolete Nerd Font icons in your project.

💭 Why

Nerd Fonts is used in many projects for a beautiful UI. It provides more than 10,000 icons, but some codepoints conflict with other fonts (especially CJK fonts). To ensure that the icons remain in the private use area, Nerd Fonts has changed the codepoints of some icons in recent releases, for example, nf-mdi-* icons (including over 2,000 icons) are deprecated since v2.3.3 and will be removed in v3.

These icons are marked as obsolete in the official cheat sheet and it's recommended to replace them with the new ones. However, you may find it boring to check all the used icons one by one, so nerdfix was written to index the cheat sheet and find obsolete icons in your project.

⚙️ Installation

You can download the pre-built binaries from the release page or manually build this project manually from source.

In addition, the binaries come with a recently updated cheat sheet and you can overwrite it with the latest one using nerdfix -i /path/to/your/file (follow this link to get the latest file).

📋 Note

Please make sure you're using Nerd Fonts after v2.3.3, otherwise the replaced new icons may not be displayed correctly. If you are a plugin author, it's also recommended to notify this in updates.

🔍 Usage

The check command checks input files and reports obsolete icons with some suggestions that you could replace them with.

nerdfix check test/test-data.txt

You get the output as follows:

warning: Found obsolete icon U+F752
  ┌─ tests/test-data.txt:1:27
  │
1 │ nf-mdi-folder_multiple = ""
  │                           ^ Icon 'nf-mdi-folder_multiple' is marked as obsolete
  │
  = You could replace it with:
        1. 󰉓 U+F0253 nf-md-folder_multiple
        2. 󱏓 U+F13D3 nf-md-folder_star_multiple
        ...

Interactive patching

The fix command reports the same information as check and displays a prompt asking the user to input a new icon to replace the obsolete one.

warning: Found obsolete icon U+F719
  ┌─ tests/test-data.txt:4:29
  │
4 │ nf-mdi-file_document_box = ""
  │                             ^ Icon 'nf-mdi-file_document_box' is marked as obsolete
  │
  = You could replace it with:
        1. 󰈙 U+F0219 nf-md-file_document
        2. 󰷈 U+F0DC8 nf-md-file_document_edit
        ...
> Input an icon: 1
# Your input: 󰈙

The prompt accepts several types of input:

Type Example
Suggestion number 1
Codepoint U+F0219
Icon name nf-md-file_document
Icon character 󰈙

Fuzzy autocompletion/search

The prompt also provides fuzzy matching suggestions when you type the icon name:

> Input an icon: documentmultiple
  󱔗 nf-md-file_document_multiple
  󱔘 nf-md-file_document_multiple_outline
  󰡟 nf-md-comment_multiple
  ...

You can also use the search command to call the prompt directly for a fuzzy search.

Autofix

nerdfix provides some features to automatically patch obsolete icons:

  • The last input is picked if an icon appears twice.
  • Use fix --replace FROM,TO to replace the prefix of an icon name with another, e.g. nf-mdi-tab is replaced with nf-md-tab when --replace nf-mdi-,nf-md- is specified.

Structured output

You can use check --format json to get structured output for further use. nerdfix prints diagnostics with the following fields line by line:

Field Description
severity Severity of a diagnostic
path Source file of a diagnostic
type Diagnostic type, currently only obsolete is supported
span Byte index span of an obsolete icon
name Icon name
codepoint Icon codepoint

⚖️ License

Licensed under either of

at your option.

You might also like...
fixred is a command line utility to fix outdated links in files with redirect URLs.
fixred is a command line utility to fix outdated links in files with redirect URLs.

fixred fixred is a command line utility to fix outdated links in files with redirect URLs. Installation fixred is installed via cargo package manager.

Fix the simple rust script as shown in README.md
Fix the simple rust script as shown in README.md

Rust Fix Me Steps Create a Github account. (If you already have one no issues) Star this repository. Fork this repository to your Github account. Clon

Fix broken crates instantly 🏃🏽‍♀️💨

Patch-Crate patch-crate lets rust app developer instantly make and keep fixes to rust crate dependencies. It's a vital band-aid for those of us living

SA-MP client server list fix but written in Rust

Server List Fix This is a samp client server list fix, which reroutes the client's request to list.sa-mp.com to sam.markski.ar. The idea is originally

A Rust CLI tool that helps you enforce Git policies through Git hooks both server and client side

GitPolicyEnforcer This is a command line utility written in Rust, that helps you utilize Git hooks, to enforce various policies. It currently supports

gfold is a CLI-driven application that helps you keep track of multiple Git repositories.

gfold is a CLI-driven application that helps you keep track of multiple Git repositories.

Helps you keep track of time for team members across different time zones & DST changes

Teamdate Helps you keep track of time for team members across different timezones and other daylight saving changes based off their location. Because

A Turing-complete but dead-simple spaced repetition CLI that helps you learn stuff.

Forne — Learn Stuff Forne is a Turing-complete spaced repetition engine to help you learn stuff your way. What does that mean? Well, there are a few p

This is a command line utility written in Rust that helps you plan factories in Satisfactory.

Satisfactory Factory Planning Utility This is a command line utility written in Rust that helps you plan factories in Satisfactory. Tell it what you w

Releases(v0.2.0)
Owner
Loi Chyan
Stay in your magic :D
Loi Chyan
fas stand for Find all stuff and it's a go app that simplify the find command and allow you to easily search everything you nedd

fas fas stands for Find all stuff and it's a rust app that simplify the find command and allow you to easily search everything you need. Note: current

M4jrT0m 1 Dec 24, 2021
rpm (Rust project manager) is a tool that helps you to manage your rust projects

rpm rpm (Rust project manager) is a open source tool for managing your rust project in an organized way Installation # make sure you have rust install

Dilshad 4 May 4, 2023
Deadliner helps you keep track of the time left for your deadline by dynamically updating the wallpaper of your desktop with the time left.

Deadliner Watch the YouTube video What's Deadliner? Deadliner is a cross-platform desktop application for setting deadline for a project and keeping t

Deadliner 34 Dec 16, 2022
A Yocto setup and management tool that helps you keep your environment up-to-date and in-sync with your team

yb (Yocto Buddy) yb is designed to make it easy to setup and (perhaps more importantly) keep Yocto environments up-to-date and in-sync with your team.

null 13 Oct 31, 2022
Animated app icons in your Dock that can run an arbitrary shell script when clicked.

Live App Icon for Mac Animated app icons in your Dock that can run an arbitrary shell script when clicked. Requirements macOS 13 (Ventura) or higher X

Daichi Fujita 13 Jun 8, 2023
fd is a program to find entries in your filesystem. It is a simple, fast and user-friendly alternative to find

fd is a program to find entries in your filesystem. It is a simple, fast and user-friendly alternative to find. While it does not aim to support all of find's powerful functionality, it provides sensible (opinionated) defaults for a majority of use cases.

David Peter 25.9k Jan 9, 2023
Incredible.dev is an AI Coding Co-worker which can code, fix, document, deploy, test your APIs. One agent to rule everything API.

Incredible.dev Early Github preview, documentation and instruction to run coming soon in a week! Here are some highlights: AI agents that can code, fi

Incredible 27 Jun 27, 2024
Sleek is a CLI tool for formatting SQL. It helps you maintain a consistent style across your SQL code, enhancing readability and productivity.

Sleek: SQL Formatter ✨ Sleek is a CLI tool for formatting SQL. It helps you maintain a consistent style across your SQL code, enhancing readability an

Nick Rempel 40 Apr 20, 2023
🧬 Material Icons for Dioxus

?? Dioxus Material Icons This project provides a simple but configurable component to render Google's Material Icons in Dioxus. ?? How to get started

Lennart Kloock 6 Jan 31, 2023
12600+ icons pack for embedded graphics!

?? embedded-icon 12600+ ?? icons for embedded-graphics. ?? Features ?? Support to multiple icon packs - Easy to add support to! ?? Multiple resolution

Patrick José Pereira 3 Jul 24, 2023