Skip to content

Add unique highlighting group to current viewing buffer/file #2923

@ugoa

Description

@ugoa

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 renderer.highlight_opened_files, which would highlight all currently opened files with one highlight group NvimTreeOpenedHL. This causes all the files share the same color scheme, and it becomes quite difficult to identify the current viewing buffer in the file tree.

I wonder if an option can be added to make the current viewing buffer to use a different hightlight group? something like highlight_current_buffer. I imagine it be a combination of option update_focused_file.enabled and renderer.highlight_opened_files.

Something like the below effect:

ss

Describe the solution you'd like
Add new option toggle this feature, such as highlight_current_buffer

Describe alternatives you've considered
Maybe add new value single to existing option renderer.highlight_opened_files?

Additional context
Please see the screenshot

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions