- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 633
Labels
PR pleasenvim-tree team does not have the bandwidth to implement; a PR will be gratefully appreciatednvim-tree team does not have the bandwidth to implement; a PR will be gratefully appreciatedQOLQuality Of Life ImprovementQuality Of Life Improvementfeature request
Description
Is this a question?
No.
Can this functionality be implemented utilising API?
No, I think.
Is your feature request related to a problem? Please describe.
Files that are added to the index are treated the same way as if they are staged. I linked the source code below that is responsible for this behaviour.
Describe the solution you'd like
Separate the two cases together by adding a new git glyph option, 'added'.
Describe alternatives you've considered
None.
Additional context
Relevant source code
Metadata
Metadata
Assignees
Labels
PR pleasenvim-tree team does not have the bandwidth to implement; a PR will be gratefully appreciatednvim-tree team does not have the bandwidth to implement; a PR will be gratefully appreciatedQOLQuality Of Life ImprovementQuality Of Life Improvementfeature request
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
alex-courtis commentedon Feb 25, 2024
Works for me! That would be most useful.
Any other tweaks in the git decorator would be most gratefully appreciated.
mohamedarish commentedon Feb 27, 2024
Isn't the git index the same as staging area? We add files to the index/staging area using
git add
?Quoting the git book
Is there a difference?
alex-courtis commentedon Mar 1, 2024
Git does still recognise them as different until you commit. In this case README change is staged and
added
has been added:mohamedarish commentedon Mar 3, 2024
The example you stated shows how git differentiated a modified file and a new file being added.
The issue is for indexed/staged.
indexed and staged are the same thing from what I know.
The plugin already differentiates new file and modified file using
untracked
andunstaged
.cheeze2000 commentedon Mar 3, 2024
@mohamedarish What Alex showed is correct and is what I meant. Git Status treats "new file added" vs "file modified" differently. It's unnecessary to go into minute details as long as I can get the message across (which I did).
mohamedarish commentedon Mar 4, 2024
As I said, isn't that already implemented using
git.untracked
andgit.unstaged
cheeze2000 commentedon Mar 4, 2024
@mohamedarish The issue concerns files that are staged or added to the index. I'm not talking about untracked or unstaged. The XY path of adding an untracked file to the index is
"A "
, which is treated as "staged".alex-courtis commentedon Aug 10, 2025
This looks to be resolved by #3176
feat(#2685): highlight git new tracked with NvimTreeGitFileNewHL (#3176)