Skip to content

feat: native support for mini.icons #1428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MeanderingProgrammer
Copy link

Details

mini.icons is an alternative to nvim-web-devicons that is getting support from quite a few plugins. This change adds native support for the plugin so users do not need to mock it via mock_nvim_web_devicons.

Currently nvim-web-devicons is used in the buffer and filetype components. Created a separate icons module to store the icon related logic which now gets used by both of these components.

The logic is to first check if mini.icons exists and has been setup, if so for the buffer component use get with the file category, for filetype use get with the filetype category. It may make sense to use the file category for both.

From there the fallback to use nvim-web-devicons or vim-devicons is kept identical.

If this is something you'd prefer not to have I can understand, the mock_nvim_web_devicons is not a bad alternative. Only downsides are all the additional highlight groups and additional startup time for mini.icons, but both are minor.

## Details

`mini.icons` is an alternative to `nvim-web-devicons` that is getting
support from quite a few plugins. This change adds native support for
the plugin so users do not need to mock it via `mock_nvim_web_devicons`.

Currently `nvim-web-devicons` is used in the `buffer` and `filetype`
components. Created a separate `icons` module to store the icon
related logic which now gets used by both of these components.

The logic is to first check if `mini.icons` exists and has been setup,
if so for the `buffer` component use `get` with the `file` category, for
`filetype` use `get` with the `filetype` category. It may make sense to
use the `file` category for both.

From there the fallback to use `nvim-web-devicons` or `vim-devicons` is
kept identical.
@shadmansaleh shadmansaleh self-requested a review June 8, 2025 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant