Nvim-web-devicons API Reference

Reference nvim-web-devicons functions for retrieving file-type icons and colors.

1|Updated Oct 26, 2025
One-click install
npx skills add https://github.com/NeKon69/nvim-dot --skill nvim-web-devicons-api-reference
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Nvim-web-devicons API Reference
Source: https://github.com/NeKon69/nvim-dot/tree/main/.agents/skills/nvim-web-devicons
Command: npx skills add https://github.com/NeKon69/nvim-dot --skill nvim-web-devicons-api-reference

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a quick reference for the nvim-web-devicons module, enabling users to easily find and use functions for displaying file-type specific icons within Neovim.

Core Features & Use Cases

  • Icon Retrieval: Get default icons, icons by filename, filetype, or extension.
  • Color Customization: Retrieve icon colors for different terminal types.
  • Configuration: Set default icons and configure icon mappings.
  • Use Case: Quickly find the correct function to display a relevant icon next to a file in your Neovim file explorer.

Quick Start

Use require("nvim-web-devicons").get_icon("file.txt", "txt", {}) to get the icon for a text file.

Frequently Asked Questions about Nvim-web-devicons API Reference

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get file icons for specific file types in Neovim?

You can retrieve file icons in Neovim by looking them up via filename, extension, or filetype. The nvim-web-devicons module provides functions like get_icon to fetch the correct icon and its associated color for display in your plugins.

Can I customize default file icons and colors in my Neovim plugin?

Yes, you can customize default file icons and colors in Neovim. The nvim-web-devicons API provides configuration options to set default icons and configure specific icon mappings, including retrieving icon colors tailored for different terminal types.

Does nvim-web-devicons work for looking up icons by filetype and extension?

Yes, nvim-web-devicons supports icon lookup by filetype, extension, and filename. This allows you to fetch the appropriate icon and its color regardless of how you identify the file within your Neovim environment.

What is the best way to display filetype specific icons in a Neovim file explorer?

The best way to display filetype specific icons in a Neovim file explorer is by using the nvim-web-devicons API reference. It facilitates programmatic access to functions for retrieving and setting file-type specific icons and their colors.

Why do I need an API reference for adding Neovim file icons?

You need an API reference for adding Neovim file icons to quickly find the correct function for retrieving and setting icons. It provides quick access to lookup functions and configuration options without manually inspecting the plugin source code.