nvim-tree / nvim-web-devicons
git clone https://github.com/nvim-tree/nvim-web-devicons.git
🔥 on GitHub Trending today
Provides Nerd Font icons (glyphs) for use by neovim plugins
—
stars, 24h
+4
stars, 7 days · #1,608
—
stars, 30 days
2.7k
★ total · +0% this week
240
forks · 16 open issues
Star history starts 2026-10-20; the chart appears after the second daily snapshot.
LanguageLua
LicenseMIT
Created2020-05-29 (6y ago)
Last push8d ago
Watchers10
OwnerOrganization
Seen on GitHub Trending
- 2026-10-20 — #8 weekly in lua · +4 ★
GitHub topics
Links
README excerpt
# Nvim-web-devicons
Provides Nerd Font [^1] icons (glyphs) for use by *Neovim* plugins:
- Icons by:
- Extension
- Full name
- Colours
- Light and dark variants
- API to modify/add icons
A `lua` fork of vim-devicons.
> [!TIP]
> nvim-web-devicons is a rolling release, adding new icons as they are introduced to Nerd Fonts. Please ensure that you are using the latest version of the font as newly introduced icons may display incorrectly or as an "unknown character".
> [!IMPORTANT]
> Nerd fonts has introduced some breaking changes with the following releases.
> Please use your plugin manager to pin nvim-web-devicons to the compatibility tag, for use with earlier Nerd Font versions.
> - `3.3`: `nerd-v3.2-compat`
> - `3.0`: `nerd-v2-compat`
[^1]: Not limited to Nerd Font icons: unicode and other fonts may be used.
## Requirements
- neovim >=0.7.0
- A Patched Nerd Font >= 3.3
## Installation
### vim.pack - Neovim 0.12+ Native Plugin Manager
[code]
## Additional Icons
Additional icons may be added for icons that are present in Nerd Fonts: use the Cheat Sheet search for available icons.
PRs are always welcome! Please see CONTRIBUTING
> [!IMPORTANT]
> If the icon you need is not available on Nerd Fonts you first need to make a
> PR to a project that feeds glyphs to Nerd Fonts. Probably the most adequate
> project to contribute is .
> Take into account that **months** can pass before the icon is available on the
> Nerd Fonts project, once there feel free to open a PR on this project, see
> CONTRIBUTING
## Usage
### Viewing
Run `:NvimWebDeviconsHiTest` to see all icons and their highlighting.
### Variants
Light or dark color variants of the icons depend on `&background`.
The variant can also be set manually in `setup` with the `variant` option.
The variant is updated:
- on `OptionSet` event for `background`, or
- after explicitly calling `require("nvim-web-devicons").refresh()`.
However, be advised that the plugin using nvim-web-devicons may have cached the icons.
### Case Sensitivity
Filename icons e.g. `"Dockerfile"` are case insensitively matched.
Extension icons e.g. `"lua"` are case sensitive.
### Setup
This adds all the highlight groups for the devicons
i.e. it calls `vim.api.nvim_set_hl` for all icons
this might need to be re-called in a `Colorscheme` to re-apply cleared highlights
if the color scheme changes
[code]
### Get Icon
Get the icon for a given file by passing in the `name`, the `extension` and an *optional* options `table`.
The name is passed in to check for an exact match e.g. `.bashrc` if there is no exact name match the extension
is used. Calls `.setup()` if it hasn't already ran.
[code]
The optional `options` argument can used to change how the plugin works the keys include
`default = ` and `strict = `. If the default key is set to true this
function will return a default if there is no matching icon. If the strict key is set
to true this function will lookup icon specifically by filename, and if not found then
specifically by ex