https://github.com/beixiyo/vv-icons.nvim
Shared icon dictionary for Neovim and shell tools (zsh / bun fzf). Neovim 与 shell 共享图标字典
https://github.com/beixiyo/vv-icons.nvim
devicons icons lua mini-icons neovim neovim-plugin nvim nvim-plugin
Last synced: 10 days ago
JSON representation
Shared icon dictionary for Neovim and shell tools (zsh / bun fzf). Neovim 与 shell 共享图标字典
- Host: GitHub
- URL: https://github.com/beixiyo/vv-icons.nvim
- Owner: beixiyo
- License: mit
- Created: 2026-04-25T07:04:38.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-23T08:47:58.000Z (28 days ago)
- Last Synced: 2026-05-23T10:35:12.851Z (28 days ago)
- Topics: devicons, icons, lua, mini-icons, neovim, neovim-plugin, nvim, nvim-plugin
- Language: Lua
- Size: 34.2 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
vv-icons.nvim
共享图标库 — JSON 存储,Neovim 与 shell 工具共用同一份数据
---
## 安装
```lua
{
'beixiyo/vv-icons.nvim',
lazy = false,
priority = 1000, -- 其他插件启动期 require('vv-icons') 时需要先就位
}
```
无 `setup` / 无 `opts`,纯数据 + 纯函数 loader,加载即用。
## 数据文件
| 文件 | 格式 | 说明 |
|------|------|------|
| `data/files.json` | 列表型:`{ match, glyph, color }[]` | 按 glob(支持 brace 展开)匹配文件名 |
| `data/directories.json` | 字典型:`{ name: { glyph?, color? } }` | 目录图标 |
| `data/extensions.json` | 字典型 | 按扩展名 |
| `data/filetypes.json` | 字典型 | 按 filetype |
| `data/git.json` | 字典型 | git status 图标 |
| `data/ui.json` | 字典型 | 通用 UI 图标 |
## Lua 引用
```lua
local icons = require('vv-icons')
-- 扁平 glyph 字符串
icons.find_file
-- 命名空间
icons.ns.ui
icons.ns.git
icons.ns.kinds -- LSP kind 图标
-- 原始 { glyph, hl } 表
icons.raw.ui
-- mini.icons 可直接消费的字典
icons.files
icons.directories
icons.extensions
icons.filetypes
```
## 典型消费
```lua
-- 灌给 mini.icons
require('mini.icons').setup({
file = require('vv-icons').files,
directory = require('vv-icons').directories,
extension = require('vv-icons').extensions,
filetype = require('vv-icons').filetypes,
})
-- 灌给 blink.cmp / nvim-cmp 的 kind 图标
local kinds = require('vv-icons').ns.kinds
```
## 可选色值
`green` / `yellow` / `red` / `blue` / `cyan` / `magenta` / `orange` / `purple` / `grey` / `white`
Lua 侧映射到 `MiniIcons{Color}` 高亮组(由 colorscheme 提供具体色值),shell 侧映射到 256 色 ANSI。