nvim-tree / nvim-web-devicons

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

Can't change C++ icon #147

Closed ahmedaljaali closed 2 years ago

ahmedaljaali commented 2 years ago

I tried to change C++ icon, but it seems to have two, one for .cc and one for .cpp

kyazdani42 commented 2 years ago

not sure i can help you, please give more informations, "i tried to change, but it seems to have two" doesn't give me anything about what you are trying to accomplish. you can have cp cpp cxx c++ cc for c++ icons.

ahmedaljaali commented 2 years ago

Thank you for responding!, I'm trying to change icon color for code files that ends with .cc 2022-07-18_21:29:41

kyazdani42 commented 2 years ago

setup might have been called by a plugin. I'd suggest using the set_icon function which takes a table of icons. Otherwise your definiton looks correct. Something like:

local my_icons = { ... }
if webdev.has_loaded then
  webdev.set_icon (my_icons)
else
  webdev.setup({ override = my_icons, default = true })
end

tell me if this works for you

ahmedaljaali commented 2 years ago

Yes, it's working, thank you so much.