kyazdani42 / nvim-tree.lua

A file explorer tree for neovim written in lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Git icons not showing next to files in nested folder on Windows only

AnsonH opened this issue · comments

Windows 10 Version 20H2 (Build 19042.1415)

Neovim version

NVIM v0.6.1
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compiled by runneradmin@fv-az152-430

Features: -acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM\sysinit.vim"
  fall-back for $VIM: "C:/Program Files/nvim/share/nvim"

Run :checkhealth for more info

Nvim-tree version
Commit 0a2f6b0

Describe the bug
On Windows only, Git icons fail to show up next to the file names whenever the file is nested inside a folder (i.e., not placed at the root of the repo).

Consider the following repo (steps to reproduce are listed later):

├── foo/
│   ├── ignored.txt
│   ├── staged.txt
│   └── untracked.txt
└── .gitignore
  • foo/ignored.txt - This file is ignored, since I put ignored.txt inside .gitignore
  • foo/staged.txt - This file is staged via git stage foo/staged.txt
  • foo/untracked.txt - This file is untracked

However, when I open Neovim on Windows:

Note that all the files inside foo/ folder are missing Git icons, while the files in the root of the repo (i.e., .gitignore) can properly show the Git icon.

To Reproduce

Inside init.lua, set-up nvim-tree without any custom config:


Open Powershell in Windows. Next:

  1. Create repo
    mkdir ~/nvim-tree-test
    cd ~/nvim-tree-test
    git init
  2. Create .gitignore at the root of repo and add ignored.txt inside the file
  3. Create 3 files inside foo/:
    mkdir foo/
    cd foo/
    ni ignored.txt
    ni staged.txt
    ni untracked.txt
  4. Stage a file
    cd ..
    git stage foo/staged.txt
  5. Open Neovim:
    nvim .

Expected behavior
Git icons should appear next to the file names in foo/:

The above screenshot is taken in Windows Subsystem Linux after I reproduce the issue.

I have the same issue

ezoic increase your site revenue