nvim-tree / nvim-web-devicons

lua `fork` of vim-web-devicons for neovim
MIT License
1.93k stars 182 forks source link

feat: add audio file icons, remove audio/video from vim filetypes #410

Closed pauchiner closed 2 months ago

pauchiner commented 4 months ago

Closes #404

Preview

Roadmap:

pauchiner commented 3 months ago

Sorry, I made those commits in a few free minutes yesterday, I didn't notice either the extensions table or the breaking changes, I'm already working on fixing it.

alex-courtis commented 3 months ago

Looking good: :NvimWebDeviconsHiTest

However I think we might be backwards here: all the new icons are in icons_by_filename wheras they should be in icons_by_file_extension. The user will be finding music file icons via get_icon with an extension rather than matching an exact file name.

The filetypes will still correctly map to icons_by_file_extension.

alex-courtis commented 2 months ago

Any updates @pauchiner ? This is really close...

pauchiner commented 2 months ago

Sorry, I was absent due to personal things, as soon as I can I will make a commit with the changes.

pauchiner commented 2 months ago

So if aren't vim filetypes, how are mapped? I think im not understanding your point, Sorry.

alex-courtis commented 2 months ago

So if aren't vim filetypes, how are mapped? I think im not understanding your point, Sorry.

No worries; this is not very clear from the names.

Files like these are simply mapped by their extension against the keys of icons_by_file_extension. There's no need for any extra mapping.

Try

:lua print(require("nvim-web-devicons").get_icon("aiff"))
hasecilu commented 2 months ago

I'm not really sure if PCM file extension is really used, so could be added.

pauchiner commented 2 months ago

I have already deleted the filetypes that I added at the time, but then by the same logic, those that were previously there should also be deleted, such as mp3, mp4, wav...

alex-courtis commented 2 months ago

I have already deleted the filetypes that I added at the time, but then by the same logic, those that were previously there should also be deleted, such as mp3, mp4, wav...

Good catch! Yes, they should be removed.

In the interest of speed, I'll push that change to this branch.

alex-courtis commented 2 months ago

I'm not really sure if PCM file extension is really used, so could be added.

Sounds good! Any others you think of please do raise a PR...