nvim-tree / nvim-tree.lua

A file explorer tree for neovim written in lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nvim-tree don't show folder with the same name

Garoze opened this issue · comments

commented

Description

For some reason when i try to create a folder with the same name the nvim-tree just don't show it, on this project in specific i was trying to create a folder named Lunasm inside the Lunasm/include but it just don't show the folder, for record it does create the folder, it just don't show on the nvim-tree

Neovim version

NVIM v0.8.1
Build type: Release
LuaJIT 2.1.0-beta3

Operating system and version

Linux gentoo 5.15.77-gentoo-dist

nvim-tree version

362ecbe

Minimal config

vim.cmd [[set runtimepath=$VIMRUNTIME]]
vim.cmd [[set packpath=/tmp/nvt-min/site]]
local package_root = "/tmp/nvt-min/site/pack"
local install_path = package_root .. "/packer/start/packer.nvim"
local function load_plugins()
  require("packer").startup {
    {
      "wbthomason/packer.nvim",
      "nvim-tree/nvim-tree.lua",
      "nvim-tree/nvim-web-devicons",
      -- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
    },
    config = {
      package_root = package_root,
      compile_path = install_path .. "/plugin/packer_compiled.lua",
      display = { non_interactive = true },
    },
  }
end
if vim.fn.isdirectory(install_path) == 0 then
  print "Installing nvim-tree and dependencies."
  vim.fn.system { "git", "clone", "--depth=1", "https://github.com/wbthomason/packer.nvim", install_path }
end
load_plugins()
require("packer").sync()
vim.cmd [[autocmd User PackerComplete ++once echo "Ready!" | lua setup()]]
vim.opt.termguicolors = true
vim.opt.cursorline = true

-- MODIFY NVIM-TREE SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
_G.setup = function()
  require("nvim-tree").setup {}
end

Steps to reproduce

  1. git clone --recursive https://github.com/Garoze/Lunasm
  2. cd Lunasm
  3. :NvimTreeToggle
  4. Go to the include folder and create a new folder named Lunasm

Expected behavior

I expected it to show the Lunasm folder on the path Lunasm/include/Lunasm/

Actual behavior

It don't show the folder, on the nvim-tree, if i do a ls the folder is there, but it doesn't show.

That file/dir is ignored by git: https://github.com/Garoze/Lunasm/blob/main/.gitignore#L50

I Toggle Git Ignore to see it.

:; git --no-optional-locks status --porcelain=v1 -z --ignored=matching -u
!! include/Lunasm/

Suggestion: change your gitignore to have a more specific match for Lunasm.

commented

That file/dir is ignored by git: https://github.com/Garoze/Lunasm/blob/main/.gitignore#L50

I Toggle Git Ignore to see it.

:; git --no-optional-locks status --porcelain=v1 -z --ignored=matching -u
!! include/Lunasm/

Suggestion: change your gitignore to have a more specific match for Lunasm.

I'm so sorry i thought it was something with nvim-tree, i was just begin dumb, thank you for the help