nvim-web-devicons: the icon library Neovim plugins depend on
Provides Nerd Font icons (glyphs) for use by neovim plugins
At a glance
- What is it?
- nvim-web-devicons is a Lua icon provider for Neovim plugins, not a file explorer. Here is what it actually does, how to install it, and where its case-sensitivity and Nerd Font version rules bite.
- Who is it for?
- Adopt nvim-web-devicons if a Neovim plugin already lists it as a dependency, or if you are writing a plugin that needs consistent file icons. Do not adopt it as a file explorer: it draws nothing on its own.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 11 days ago.
- What is it written in?
- Mainly Lua, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 24, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What nvim-web-devicons solves for plugin authors
Neovim has no built-in notion of what icon belongs next to a .lua file, a Dockerfile, or a .gitignore entry. Every plugin that wants to render a file tree, a tab bar, or a statusline would otherwise have to carry its own lookup table and its own color definitions. nvim-web-devicons centralizes that table and exposes it as a Lua API, so a plugin can ask for an icon and a color instead of shipping one.
The README describes the scope precisely: icons by extension, icons by full name, colours, light and dark variants, and an API to modify or add icons. It is a library, and it says so. It draws nothing. If you install it alone and open Neovim, the screen looks exactly the same as before. That is the single most common source of confusion around this project, and it is worth stating before anything else.
The intended audience is therefore narrow but deep: authors of file explorers, statuslines, tablines, and pickers, plus users of those plugins who want to customize an icon that the maintainers got wrong. The project is a Lua fork of vim-devicons, which served the same role for Vimscript plugins.
How the lookup works: filename, extension, and the strict flag
The core call is get_icon(filename, extension, options). The README states that the name is checked for an exact match first, for example .bashrc, and if there is no exact name match the extension is used. That ordering matters more than it first appears, because it produces a specific failure mode.
Without strict mode, a file with no extension can still receive an icon if its name happens to match an entry in the extension table. Setting strict = true in setup changes the lookup to consult the filename table and the extension table separately, which the README says prevents exactly that case. If you have ever seen an extensionless file pick up a nonsensical icon, strict is the switch to reach for.
Case handling is asymmetric and documented as such. Filename icons such as Dockerfile are matched case insensitively. Extension icons such as lua are case sensitive. A plugin author passing an uppercased extension will get a miss, and the fix belongs on the caller's side, not in a configuration option.
Colors come back through separate functions. get_icon returns the icon and a highlight name. get_icon_color returns the icon and a GUI color code, and get_icon_cterm_color returns a cterm color instead. The README gives a worked assertion for init.lua returning #51a0cf. The setup function installs the highlight groups via vim.api.nvim_set_hl, which is why the README warns it may need to be re-called on a Colorscheme event: a colorscheme change can clear those groups.
Installing nvim-web-devicons and checking it loaded
Requirements are Neovim 0.7.0 or newer and a patched Nerd Font at version 3.3 or newer. On Neovim 0.12 and later, the native plugin manager is enough. The README gives this exact snippet:
vim.pack.add({
{ src = 'https://github.com/nvim-tree/nvim-web-devicons' }
})If you use a different plugin manager, the README does not give snippets for it, so follow that manager's normal GitHub source syntax rather than inventing options here.
The fastest way to confirm the plugin is present and your font can render the glyphs is the built-in command. Run :NvimWebDeviconsHiTest. It displays all icons alongside their highlighting, so a missing glyph shows up immediately as an unknown-character box rather than as a silent gap in a file tree.
To call the API from your own configuration, the README shows this form:
local icon, color = require'nvim-web-devicons'.get_icon_color("init.lua", "lua")
assert(icon == "")
assert(color == "#51a0cf")If the assertion fails, the usual cause is that setup has not run yet. The README notes that get_icon calls setup itself if it has not already run, and that you can check the state explicitly with require'nvim-web-devicons'.has_loaded().
Overrides go through the setup table. The README's example replaces the zsh entry with an icon, a GUI color, a cterm color, and a name, and notes that DevIcon is appended to the name. There are also override_by_filename, override_by_extension, and override_by_operating_system tables, and the README states those take effect when strict is true. set_icon({...}) is available for changing a single icon at runtime.
The Nerd Font version pin is the real upgrade hazard
This is where the project's rolling-release model becomes a genuine operational cost. The README calls nvim-web-devicons a rolling release that adds icons as they are introduced to Nerd Fonts, and warns that newly introduced icons may display incorrectly or as an unknown character unless you are on the latest font.
The reverse direction is worse. Nerd Fonts introduced breaking changes at versions 3.3 and 3.0, and the README tells users to pin nvim-web-devicons to a compatibility tag for earlier fonts: nerd-v3.2-compat for Nerd Font 3.2, and nerd-v2-compat for version 2. That pin is not optional advice. If you are on an older font and track the default branch, you get a config that looks correct and renders boxes.
The contribution path has its own delay. The README states that if an icon is not available in Nerd Fonts, you must first open a pull request against a project that feeds glyphs to Nerd Fonts, and names devicon as probably the most adequate target. It then says months can pass before the icon reaches Nerd Fonts, at which point a pull request here makes sense. For a team that needs a specific logo rendered this quarter, that timeline is a reason to use an override rather than to file an upstream request.
There is also a caching caveat the README raises directly: the plugin using nvim-web-devicons may have cached the icons, so a refresh call in your config does not guarantee the consumer picks up the change.
Light and dark variants, and what refresh does not fix
The variant follows the &background option by default. The README says the variant is updated on the OptionSet event for background, or after an explicit require("nvim-web-devicons").refresh() call. It can also be forced in setup with variant = "light" or "dark", which is the pragmatic choice when a plugin's own theme does not track background changes reliably.
One option deserves attention because its effect is not obvious from its name. The blend option overrides the blend value for all highlight groups. The README states that setting blend = 0 makes all icons opaque, and that in practice this means icon width will not be affected by the pumblend option, citing issue 608. If your completion popup menu renders icons at a different width than the rest of the interface, that is the knob, and it is a rendering fix rather than an aesthetic preference.
color_icons defaults to true, so each icon gets its own highlight color; setting it to false collapses everything to the default icon color. default defaults to false and controls whether an unmatched file gets a fallback icon at all. A plugin that wants a fallback has to ask for it, either through the global option or per call with { default = true }.
Where nvim-web-devicons is the wrong choice
If you want a file tree, a fuzzy finder, or a statusline, this is not the plugin. It has no UI. Installing it and expecting to see icons is the mistake behind a large share of the support questions around the project, and the correct fix is to install the consumer plugin, which will pull this in as a dependency.
If your font is older than Nerd Font 3.3 and you cannot upgrade it, you are committing to a pinned compatibility tag for as long as that holds. That is a maintenance obligation, not a one-time setup step, because the default branch moves.
mini.icons is the alternative worth naming, and the difference is architectural rather than cosmetic. mini.icons is part of mini.nvim, a collection of independent modules that share one distribution and one set of conventions. If you already use mini.nvim modules, pulling in icons from the same source avoids a second dependency and keeps the update cadence aligned with modules you already track. If your plugin ecosystem expects the nvim-web-devicons API specifically, mini.icons will not satisfy it, because plugins call require('nvim-web-devicons'), not a generic icon interface. The choice is usually made for you by whichever plugin you are installing.
Maintenance, licence, and the cost of contributing an icon
The repository is MIT licensed, which permits commercial and private use, modification, and redistribution provided the copyright notice and permission notice are included. That is a permissive arrangement and imposes no copyleft obligation on plugins that depend on it. This is a description of the licence text, not legal advice; if your organization has specific redistribution requirements, read the LICENSE file in the repository.
The last push to the default branch was on 2026-09-21. The project is not archived. The repository carries no release tags, which is consistent with the README's description of a rolling release: there is no versioned artifact to upgrade to, so your plugin manager tracks the branch unless you deliberately pin a compatibility tag.
For contributors, the build is not a simple edit. The Makefile regenerates icon tables by downloading vim-colortemplate 2.2.3 and mini.align 0.14.0, then running Neovim headlessly against scripts/generate.lua, scripts/align.lua, and scripts/sort_filetypes.lua. A colors-check target fails the build if the generated files under lua/nvim-web-devicons/default/, lua/nvim-web-devicons/light/, or lua/nvim-web-devicons/filetypes.lua drift from what is committed. Editing a generated table by hand will be reverted by the next generate run, and the Dockerfile exists to reproduce that toolchain on debian:stable-slim with luacheck and stylua installed. If you plan to send a pull request, run make all and make style-check before opening it.
Editorial conclusion
Adopt nvim-web-devicons if a Neovim plugin already lists it as a dependency, or if you are writing a plugin that needs consistent file icons. Do not adopt it as a file explorer: it draws nothing on its own. Before installing, confirm your Neovim is at least 0.7.0 and your patched Nerd Font is at least 3.3; on older fonts, pin the compatibility tag nerd-v3.2-compat or nerd-v2-compat through your plugin manager instead of tracking the rolling release.
Frequently asked questions
how to install nvim web devicons
On Neovim 0.12 or later you can use the native manager with vim.pack.add and the GitHub source URL shown in the README. Otherwise install it through your plugin manager's normal GitHub source syntax. You also need Neovim 0.7.0 or newer and a patched Nerd Font at version 3.3 or newer.
how to enable nvim web devicons
There is no enable switch, because the plugin has no interface of its own. It becomes visible when a consumer plugin such as a file explorer or statusline calls its API. To confirm it is loaded and your font renders the glyphs, run :NvimWebDeviconsHiTest, and check require'nvim-web-devicons'.has_loaded() from Lua.
Why are nvim-web-devicons not showing in my file tree?
The README notes that the plugin using nvim-web-devicons may have cached the icons, so calling refresh() in your own config does not guarantee the consumer updates. The other common cause is the font: the README warns that icons added recently may display as an unknown character unless you are on the latest Nerd Font.
Which Nerd Font version does nvim-web-devicons require?
The requirements section asks for a patched Nerd Font at version 3.3 or newer. For earlier fonts the README says to pin the compatibility tag nerd-v3.2-compat for Nerd Font 3.2 or nerd-v2-compat for version 2 through your plugin manager.
Is nvim-web-devicons the same as vim-devicons?
No. nvim-web-devicons is described in the README as a Lua fork of vim-devicons, which was written for Vimscript plugins. The API here is Lua, and the icons are consumed by Neovim plugins.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/nvim-tree-nvim-web-devicons)