Skip to content

feat(#2685): highlight git new tracked with NvimTreeGitFileNewHL #3176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 10, 2025

Conversation

julienvincent
Copy link
Contributor

@julienvincent julienvincent commented Aug 6, 2025

fixes #2685

Currently nvim-tree doesn't highlight new, tracked files in the working copy/directory.

I'm not sure if this was perhaps done intentionally, but if that's the case it's not immediately obvious to me why this would be necessary.

This change assigns the NvimTreeGitFileNewHL highlight to the " A" git porcelain status marker.


For some context, I primarily work with jujutsu which results in all new files in the working directory being tracked and obtaining the " A" (New file in working tree) status.

As a result all new files in my repo get no highlighting! This fixes that.

Currently nvim-tree doesn't highlight new, tracked files in the working
copy/directory.

This change assigns the `NvimTreeGitFileNewHL` highlight to the `" A"`
git porcelain status marker.
@alex-courtis alex-courtis changed the title Highlight new, tracked files in working copy feat(#2685): highlight git new tracked with NvimTreeGitFileNewHL Aug 10, 2025
Copy link
Member

@alex-courtis alex-courtis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for your contribution!

I can't find any reason that this highlighting was not done.

@alex-courtis alex-courtis merged commit 0a52012 into nvim-tree:master Aug 10, 2025
4 checks passed
@julienvincent julienvincent deleted the jv/new-tracked-hl branch August 10, 2025 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New git glyph option: 'added'
2 participants