monokai.nvim icon indicating copy to clipboard operation
monokai.nvim copied to clipboard

Monokai seems to clobber colors in nvim-tree

Open johnmathews opened this issue 2 years ago • 1 comments

I really like this colorscheme, thanks.

I have this issue where sometimes when I open up nvim-tree all the nvim-tree text and icons are white. This only happens with this plugin. If I use another colorscheme the issue is absent.

I don't know how to begin debugging the problem, as Im not sure what the highlight groups in nvim-tree are called (https://github.com/kyazdani42/nvim-tree.lua/discussions/1601#discussion-4416148). Maybe you have some ideas?

johnmathews avatar Sep 23 '22 11:09 johnmathews

Hi, Not sure it's the right way to do it, but I have manually added all the "highlight groups" I needed for nvim-tree when I setup the theme, which gives something like this :

local monokai = require('monokai')
local palette = monokai.soda

monokai.setup {
    ...
    custom_hlgroups = {
      -- nvim-tree
        NvimTreeFolderName = {
          fg = palette.green,
        },
        NvimTreeRootFolder = {
          fg = palette.base8,
        },
        NvimTreeFolderIcon = {
          fg = palette.green,
        },
        NvimTreeOpenedFolderName = {
          fg = palette.aqua,
        },
        NvimTreeFileIcon = {
          fg = palette.aqua,
        },
        NvimTreeSpecialFile = {
          fg = palette.purple
        },
        NvimTreeSymlink = {
          fg = palette.green,
        },
       ...
    }
}

Colors are not optimal but it looks like default NERDTree design I had on vim... CleanShot 2022-09-29 at 18 24 47

Hope it helps !

jbleuzen avatar Sep 29 '22 16:09 jbleuzen