Giter Club home page Giter Club logo

Comments (9)

Hubro avatar Hubro commented on July 20, 2024 1

@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.

Hubro avatar Hubro commented on July 20, 2024 1

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.

kyazdani42 avatar kyazdani42 commented on July 20, 2024

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.

Hubro avatar Hubro commented on July 20, 2024

@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.

Hubro avatar Hubro commented on July 20, 2024

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.

Hubro avatar Hubro commented on July 20, 2024

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.

kyazdani42 avatar kyazdani42 commented on July 20, 2024

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.

kyazdani42 avatar kyazdani42 commented on July 20, 2024

did you try fixing the colorscheme issue instead ? you should just be able to run colorscheme during startup.

from nvim-web-devicons.

kyazdani42 avatar kyazdani42 commented on July 20, 2024

maybe try https://github.com/ellisonleao/gruvbox.nvim this one if the original theme is the culprit

from nvim-web-devicons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.