Add unique highlighting group to current viewing buffer/file #2925
-
Can this functionality be implemented utilising API? I'd say no? I have searched the codebase and options but got no clue of how to support this with existing APIs. Is your feature request related to a problem? Please describe. The current option in nvimtree to highlight opened files is controlled by option I wonder if an option can be added to make the current viewing buffer to use a different hightlight group? something like Something like the below effect: Describe the solution you'd like Describe alternatives you've considered Additional context |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
It's possible to add those highlight groups, a pull request would be most gratefully appreciated. However, I don't think it is really necessary: the opened file is indicated by the cursorline, which overrides the opened files highlight. It looks like you've got setup: ---
view = {
number = true,
cursorline = true,
--- highlight: :hi NvimTreeCursorLine guifg=blue
:hi NvimTreeCursorLineNr guifg=red |
Beta Was this translation helpful? Give feedback.
-
If you're happy with the above I'll move this to Q&A Discussions |
Beta Was this translation helpful? Give feedback.
-
Thank you so much, this is beautiful and exactly what I wanted. Really appreciate it! |
Beta Was this translation helpful? Give feedback.
It's possible to add those highlight groups, a pull request would be most gratefully appreciated.
However, I don't think it is really necessary: the opened file is indicated by the cursorline, which overrides the opened files highlight.
It looks like you've got
&cursorline
and&number
disabled. Turn one or both on and then change their highlight:setup:
highlight: