Hi, it would be nice to have different colors for the opened folders and the default folder glyphs, like we could do in Nerdtree, like this:

A different highlight group for the opened ones and for the closed ones.
you could implement this if you wish, you've got to modify the color table (to add another group), and the highlight choice in renderer.lua :)
I'm not a lua programmer, i tried to do it but i couldn't... Even forked the repo, so if i could manage to do it i would PR. But i am not able to.
Thanks to the attention anyway.
Hi, do not close suggestions that might be realized by other people :) maybe i'll have time at some point
Oh sorry, didn't realized that, my mistake
Hey @hrqmonteiro you could do something like this
Lua variant
vim.g.nvim_tree_icons = {
folder = {
default = "",
open = "",
empty_open = "",
empty = "",
symlink = "",
}
}
Viml variant
let g:nvim_tree_icons = {
\ 'folder': {
\ 'default': "",
\ 'open': "",
\ 'empty_open': "",
\ 'empty': "",
\ 'symlink': "",
\ }
\ }
It will do this

Is this what you had in mind?
Hey @hrqmonteiro you could do something like this
Lua variant
vim.g.nvim_tree_icons = { folder = { default = "", open = "", empty_open = "", empty = "", symlink = "", } }Viml variant
let g:nvim_tree_icons = { \ 'folder': { \ 'default': "", \ 'open': "", \ 'empty_open': "", \ 'empty': "", \ 'symlink': "", \ } \ }It will do this
Is this what you had in mind?
Actually no, this i already have (a different icon for the closed and the open), i wanted to highlight it differently, a color for each of them, see?
I can take this too. I was thinking about highlighting currently opened files that are pretty similar to what @hrqmonteiro is looking for, maybe I can do both.
has been fixed in #258
has been fixed in #258
Okay, i was using the fork of afonsocarlos, for like a week, and i was having the folder icon changed it's color when i opened it.
Today i say what you merged, and i switched to the main repo and main branch. But just the name of the opened folder is changing color.
Why did you chose to go this way? Can't we have the folder ICON change the color?
@kyazdani42 I checked here and i think it could be the case of only condition this part:
To something like this:
hl_icon = 'NvimTreeFolderIcon'
if vim.g.nvim_tree_highlight_opened_files then hl_icon = 'NvimTreeOpenedFolderIcon' end
table.insert(hl, {hl_icon, line, depth, depth+icon_len})
What do you think?
yep go for it
Still doesn't work.
I literally use the afonso fork on this commit because it has the option to highlight the icon instead of the text.
@hrqmonteiro we're working on that already, there's a PR in progress to improve the level of customization for opened files highlighting
Most helpful comment
yep go for it