nvim-tree / nvim-web-devicons

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

Add custom icons for .cu ( cuda) files #296

Closed basava70 closed 10 months ago

basava70 commented 11 months ago

Hi, Thanks for the awesome plugin. I wanted to ask if there is a way to add custom icons for new file types not listed in the plugin. One way, I found is to add it to "lua/nvim-web-devicons.lua". But that would break any future updates. I was wondering if there is another intended way to add icons for new file types. Thanks in advance.

gegoune commented 11 months ago

If that's widely recognised filetype and there is no already existing icon for the same extension we can add it here. PR welcome. :)

basava70 commented 11 months ago

I don't think cuda is as heavily used as python or cpp. It's only used for parallel programming. As of now, I don't even see an existing file type. Which is why I thought it would probably cool to add a random Nvidia icon myself via this plugin if possible.

alex-courtis commented 11 months ago

Which is why I thought it would probably cool to add a random Nvidia icon myself via this plugin if possible.

No thank you. Let's keep company logos out of this; there can be copyright and other legal issues when used without their permission.

basava70 commented 10 months ago

Can you at least make it possible to add custom icons for new file types as part of customizing nvim-web-devicons ?

alex-courtis commented 10 months ago

Can you at least make it possible to add custom icons for new file types as part of customizing nvim-web-devicons ?

Of course, please see https://github.com/nvim-tree/nvim-web-devicons#set-an-icon

Providing the icon is available to your terminal, you may set it.

basava70 commented 8 months ago

Thanks for the reply. Probably a little late. But that set_icon only works to override an existing filetype is it not ?. I tried changing it for .cu files but i stll get the default icon for .cu filetype. Is there anything else I can try ?

gegoune commented 8 months ago

It would help if you showed the code you written that doesn't work.

basava70 commented 8 months ago

Nvm I made a minor mistake. It is working now. Thanks a ton :)