nvim-tree / nvim-web-devicons

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

change color icons #182

Closed Ethanol48 closed 1 year ago

Ethanol48 commented 1 year ago

I wanted to change some icons, that works just fine the only thing is that now there are white, and I'm trying to put the colors, but they don't change, am I doing it right ?

require'nvim-web-devicons'.setup{

    override = {
        go = {
            icon = " ",
            color = "#00ADD8"
        },
        css = {
            icon = "",
            color = "#3261A6"
        },
        sh = {
            icon = "",
            color = "#2B3F5D"
        },
        html = {
            icon = "",
            color = "#DD6C3D",
        }
    }
}
Ethanol48 commented 1 year ago

I also tried this in my init.lua, the icon change work but the color doesn't

require'nvim-web-devicons'.setup{}

require("nvim-web-devicons").set_icon {
    go = {
        icon = "",
        color = "#00ADD8"
    },
    Dockerfile = {
        icon = "",
        color = "#4895E6",
    },
    css = {
        icon = "",
        color = "#3261A6"
    },
    sh = {
        icon = "",
        color = "#2B3F5D"
    },
    html = {
        icon = "",
        color = "#DD6C3D",
    }
}
alex-courtis commented 1 year ago

Do you have &termguicolors set?

You can use cterm-color if you don't use it.

https://github.com/nvim-tree/nvim-web-devicons/blob/05e1072f63f6c194ac6e867b567e6b437d3d4622/lua/nvim-web-devicons.lua#L168

Ethanol48 commented 1 year ago

Do you have &termguicolors set?

You can use cterm-color if you don't use it.

https://github.com/nvim-tree/nvim-web-devicons/blob/05e1072f63f6c194ac6e867b567e6b437d3d4622/lua/nvim-web-devicons.lua#L168

Yes, I have set it to true,

vim.opt.termguicolors = true
alex-courtis commented 1 year ago

Which plugin are you using? It will need to actually set the colours.

Please try https://github.com/nvim-tree/nvim-tree.lua which explicitly sets icon colours.

Ethanol48 commented 1 year ago

I use that plugging, but my issue was resolved, I edited directly the source file, didn't find another way.