nvim-tree.lua icon indicating copy to clipboard operation
nvim-tree.lua copied to clipboard

make the filename color like icon's color.

Open singlexyz opened this issue 3 years ago • 10 comments

e.g. Make index.html filename part same to icon(orange). 截屏2021-04-12 上午7 45 26

singlexyz avatar Apr 11 '21 23:04 singlexyz

if this is done in a clean way i wouldn't be against it, although i think it's a little overkill and would probably conflict with other thing like git highlighting and lsp diagnostics. Also the renderer.lua is getting quite big and this feature would add another good amount of code in it, maybe splitting it beforehand would make it easier.

kyazdani42 avatar Apr 12 '21 19:04 kyazdani42

#1131 adds colour for icons when not using nvim-web-devicons.

alex-courtis avatar Apr 03 '22 03:04 alex-courtis

Implemented!

alex-courtis avatar Apr 10 '22 04:04 alex-courtis

are you sure this feature request is not about changing the filename color ? i don't think it's implemented yet

kyazdani42 avatar Apr 10 '22 13:04 kyazdani42

are you sure this feature request is not about changing the filename color ? i don't think it's implemented yet

My mistake. Apologies @singlexyz

alex-courtis avatar Apr 11 '22 00:04 alex-courtis

This is a nice Quality Of Life improvement.

alex-courtis avatar Oct 15 '22 04:10 alex-courtis

Would that not potentially interfere with git highlighting?

gegoune avatar Oct 16 '22 06:10 gegoune

Good point. We'd need to define and document a priority like diagnostic signs > git signs.

alex-courtis avatar Oct 16 '22 06:10 alex-courtis

@alex-courtis I believe priority will be implemented by yours #2455, won't it? Will your PR bring us closer to closing this issue? Is it even what we want at all (having external source (web-devicons) dictate colour of filename)?

gegoune avatar Nov 08 '23 17:11 gegoune

@alex-courtis I believe priority will be implemented by yours #2455, won't it? Will your PR bring us closer to closing this issue? Is it even what we want at all (having external source (web-devicons) dictate colour of filename)?

It will allow the user to always specify a highlight group for the icon and filename. Unfortunately it doesn't cover this functionality.

devicons.get_icon does return the highlight group for the icon which we apply to the icon and could apply to the filename. We could implement that in the overhaul or a separate change.

alex-courtis avatar Nov 11 '23 23:11 alex-courtis