glyph.hx
A Nerd Font icon and color library for Helix plugins
- Stars: 12
- Last commit:
- Created:
A Nerd Font icon and color library for Helix plugins
A Nerd Font icon and color library for Helix plugins.
glyph.hx doesn't do anything on its own — it's a shared lookup table other plugins require so they can show colored file-type, folder, and git-status icons without each one maintaining its own copy.

1. Install the plugin-enabled fork of Helix by following the instructions here.
2. Install glyph.hx via forge:
forge pkg install --git https://github.com/Ra77a3l3-jar/glyph.hx.git
Plugins that depend on glyph.hx pull it in automatically via forge:
;; cog.scm
(define dependencies
'((#:name glyph #:git-url "https://github.com/Ra77a3l3-jar/glyph.hx.git")))
This plugin is intended to be used by other plugins from Steel, not invoked directly:
(require "glyph/glyph.scm")
(glyph-icon "main.rs") ; Rust's Nerd Font icon
(glyph-color "main.rs") ; -> "#dea584"
(glyph-dir-icon "src") ; the icon mini.icons uses for a src/ directory
(glyph-dir-color "src") ; -> "#9d7cd8"
(glyph-git-icon 'modified) ; -> "~"
(glyph-git-color 'modified) ; -> "#cbcb41"
;; turns any of the hex colors above into a real Style, ready for
;; frame-set-string! or add-inlay-hint
(glyph-style (glyph-color "main.rs"))
| Function | Takes | Returns |
|---|---|---|
glyph-icon | a file name | its Nerd Font icon, or a generic file icon if unknown |
glyph-color | a file name | its hex color, or a neutral gray if unknown |
glyph-dir-icon | a directory name | its Nerd Font icon, or a generic folder icon if unknown |
glyph-dir-color | a directory name | its hex color, or a neutral azure if unknown |
glyph-git-icon | a git status symbol | its icon (see table below) |
glyph-git-color | a git status symbol | its hex color |
glyph-style | a hex color, #:base (optional) | a Style with that color as foreground, built on top of #:base (defaults to the current theme's ui.text) |
File and directory lookups match first by exact name (Makefile, .git, README, ...), then by extension, falling back to a generic icon if nothing matches.
|
A sidebar file tree with colored file and folder icons
|
A recent-files picker with colored file icons
|
Note
Icons are sourced from mini.icons and nvim-web-devicons all rights to the icons remain with their respective projects and are subject to their licenses.