π¦ rust-devicons
A Rust library inspired by vim-devicons, that provides filetype glyphs (icons) for a wide range of common file formats.
Features
- π¦ Icon Retrieval: Get file or directory icons based on file name/extension.
- π¦ Icon Color: Retrieve the color associated with the icon depending on the specified theme.
- π¦ Filetype Support: Supports a wide range of filetypes and filename conventions (dockerfile, makefile, etc.).
- π¦ Customizable Themes: Supports both light and dark themes.
Installation
NOTE: you'll need to use a NerdFont to properly display the icons.
Usage
Hereβs a simple example of how to use devicons
to retrieve a file icon with the dark theme:
use Path;
use ;
Running the Examples
You can find more usage examples in the examples
directory. To run them, use:
License
This project is licensed under the Apache 2.0 License.