Announcing ‘mini.icons’

announce
reddit
General icon provider. Several categories (file, directory, OS, LSP, etc.) and styles, better blending with color scheme, and more
Author

Evgeni Chasnovski

Published

July 3, 2024

Originally posted on Reddit

Default “glyph” style and dark color scheme

Default “glyph” style and light color scheme

Fallback “ascii” style

Hello, Neovim users!

Let us rejoice at the release of mini.icons - new module of mini.nvim intended to be a general icon provider. It can also be installed using separate GitHub repository.


As recent releases of ‘mini.diff’ and ‘mini.git’ allowed ‘mini.statusline’ to require one less external dependency (‘lewis6991/gitsigns.nvim’), I’ve got curious if ‘nvim-tree/nvim-web-devicons’ replacement can be fit in ‘mini.nvim’ design. Having custom solution for icons would benefit at least four modules (and probably more), so it seemed worth it. In the end, I found the approach that works for me and is based on several ideas:


Although the actual code logic is comparatively small, the major time consuming hurdles with ‘mini.icons’ were around it:


Features:


I sincerely hope that you give ‘mini.icons’ a try. With its final result, I think it is a better alternative to ‘nvim-web-devicons’; both for end users and plugin authors. Here are the more detailed comparisons for users and for plugin authors. Besides, as a user you can add MiniIcons.mock_nvim_web_devicons() to your config and it should work with other plugins which support only ‘nvim-web-devicons’ (yet).

Please, check it out and tell me what you think! You can leave your suggestions either here in comments or in dedicated beta-testing issue.

Thanks!