nvim-tree / nvim-web-devicons

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

[Bug] Got dark icons for dark background and light icons for light background #226

Closed Bekaboo closed 1 year ago

Bekaboo commented 1 year ago

Hi, first of all, thanks for your great work on providing dark variants of icons for colorschemes with light background!

This new feature works well for the first time I enter Nvim: if I set the default background to dark, I get light (original) variants of icons and if I set the default background to light, I get dark icons.

But when I change the background inside Nvim with :set background=light or :set background=dark, I get dark icons for dark background and light icons for light background.

I have no config for nvim-web-devicons. I use lualine.nvim and barbar.nvim, and telescope.nvim, they all use nvim-web-devicons and get wrong icon colors.

A short video demonstrating this issue:

https://user-images.githubusercontent.com/76579810/224425651-5fcb5db0-330d-42dc-b064-051dcaa7ae6c.mp4

alex-courtis commented 1 year ago

Yeah... it's a bit of a problem: plugins will cache the icons. See: https://github.com/nvim-tree/nvim-web-devicons#variants

Are the colours correct when you set background on startup i.e. before your plugins start?

Bekaboo commented 1 year ago

Are the colours correct when you set background on startup i.e. before your plugins start?

Yes, the bug only happens when I change the background after entering nvim.

alex-courtis commented 1 year ago

Are the colours correct when you set background on startup i.e. before your plugins start?

Yes, the bug only happens when I change the background after entering nvim.

I'm afraid you'll need to raise an issue with each affected plugin.