kyazdani42 / nvim-tree.lua

A file explorer tree for neovim written in lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Git highlight and icon doesn't appear on file

fedepujol opened this issue · comments

OS
Windows 10

Neovim version
NVIM v0.6.0
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compiled by runneradmin@fv-az152-703

Nvim-tree version
master branch

Describe the bug
When doing simple editing task on a file (changing and adding new lines) or delete the file or folder. The git status (highlight and icon) doesn't go all the way to the file and stops on the first folder.

image

I've modified the init.lua from the terminal folder and it doesn't get the highlight or the icon for the git status. However this doesn't happen on my linux machine.

To Reproduce
Modify/delete/add a new file/folder to current directory

Expected behavior
Get git highlight and icon for modified files/folder

I'm not sure how to debug this, i do not have a windows environment to test this :/ maybe you could give it a try if you are good enough with windows debugging 😄

I could try with some pointers! The strange thing is that it used to work on an older version (not sure which commit but I'll try to identify when it goes away).

Where will be a good place to start debugging this?

OS: Windows 10
Neovim version: NVIM v0.7.0-dev+715-g1f3c0593e

Same thing happening here.
It was working fine up to and including commit: b853e10

My guess is that it has something to do with the way it handles windows paths. Either a casing issue (c: C:), a forward/backward slash translation or short/absolute path translation.

Icons and highlights work only for the root folder children(files and folders).

OS: win10
Neovim Version: V0.6.0

I have the same problem. but after reverting back to "ec3f10e"(1.6.7),it was fine.
Although the font color has changed to green.

uTools_1639817224610

For me on Windows, Git highlight only works on project root files and folders, but the files inside those folders don't have Git highlight.

In the image below the base.html file has been modified, but it is not highlighted, only the folder that contains it.
image

OS: win11
Neovim Version: V0.6.0

I have the same problem too.

@kyazdani42 The problem is how it handle the forward/backward slashes in Windows. It doesn't change all the all of them.
I've modified this files and they begin to appeared like this:

C:\Users\fp\AppData\nvim-data\site\paq\packs\start\nvim-tree.lua\lua/nvim-tree/git
C:\Users\fp\AppData\nvim-data\site\paq\packs\start\nvim-tree.lua\lua/nvim-tree/git/init.lua
C:\Users\fp\AppData\nvim-data\site\paq\packs\start\nvim-tree.lua\lua/nvim-tree/git/utilslua
C:\Users\fp\AppData\nvim-data\site\paq\packs\start\nvim-tree.lua\lua/nvim-tree/populate.lua

After a changing all backward slashes to forward slashes, the issue goes away.

ezoic increase your site revenue