Comments (9)
@kyazdani42 I finally found the issue. My colorscheme setup code waits until the first BufEnter, because of a bug I ran into when setting the colorscheme before a client had connected. If I comment out those lines, I get colored icons. Here is a minimal setup demonstrating the problem:
set termguicolors
exec plug#begin('./bundle')
Plug 'ryanoasis/vim-devicons'
Plug 'kyazdani42/nvim-web-devicons'
Plug 'kyazdani42/nvim-tree.lua'
Plug 'morhetz/gruvbox'
exec plug#end()
lua <<LUA
require("nvim-web-devicons").setup{ default = true }
require("nvim-tree").setup{}
LUA
au BufEnter * ++once colorscheme gruvbox
from nvim-web-devicons.
Setting the colorscheme normally works for now.
I don't quite remember exactly what forced me to delay setting the colorscheme in the first place. I think I was playing with a GUI for Neovim.
from nvim-web-devicons.
hi !
Did you manage to reproduce with a smaller configuration ? your configuration is quite big.
Also which version of neovim do you use ? and which terminal do your run neovim in ?
from nvim-web-devicons.
@kyazdani42 Unfortunately, when I made a minimal configuration with just nvim-web-devicons and nvim-tree, icon colors worked as they should. That's why this is so frustrating.
➜ nvim --version
NVIM v0.5.1
Build type: Release
LuaJIT 2.0.5
I use alacritty
as my terminal:
➜ alacritty --version
alacritty 0.9.0 (fed349aa)
from nvim-web-devicons.
In a minimal setup, I can only replicate this issue if I accidentally configure nvim-web-devicons twice:
require("nvim-web-devicons").setup{ default = true }
require("nvim-web-devicons").setup{ default = true }
-- No colors!
But this isn't what breaks things in my main config. It doesn't matter if I configure it 0 times, once, twice or more.
from nvim-web-devicons.
Also I just realized, when I reload my config I don't get full color support in nvim-tree, only the git status icons get colors. The file type icons are still white 🤔
from nvim-web-devicons.
i think it might be related to your configuration, i haven't been able to reproduce this running setup multiple times. I also can reload my config and it doesn't break anything.
i see that you have plug and packer installed in your configuration. Could this be an issue ?
from nvim-web-devicons.
did you try fixing the colorscheme issue instead ? you should just be able to run colorscheme during startup.
from nvim-web-devicons.
maybe try https://github.com/ellisonleao/gruvbox.nvim this one if the original theme is the culprit
from nvim-web-devicons.
Related Issues (20)
- Create a category for icons from desktop environments and window managers HOT 2
- Cannot override some icons by filename HOT 7
- TeX icon incorrect HOT 1
- [QUESTION]: how to add custom icon to laravel blade files HOT 4
- Invalid highlight name HOT 15
- change only icon color HOT 1
- W18 invalid character in a group name HOT 2
- Default icon is not working correctly HOT 12
- FR: differentiate `.d.ts` from `.ts` files (typescript) HOT 3
- Add known issue to README
- Custom icons not working on latest nvim nightly HOT 7
- Gulpfile and Gruntfile incorrect icon HOT 12
- Add issue template HOT 6
- Cannot override Lua icon color HOT 9
- Add gleam icon HOT 2
- Feature: Allow setup to be run multiple times
- set_icon not work HOT 3
- Cannot install nvim-web-devicons properly on Nvim 0.7.2 HOT 2
- feat: Allow overrides by patterns HOT 1
- Make files in `diagnostics` use `TroubleFileName` color HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvim-web-devicons.