nvim-tree / nvim-tree.lua

A file explorer tree for neovim written in lua
Other
6.99k stars 603 forks source link

when I open a project some subdirectory are not showing #1463

Closed Leo-Ni88 closed 2 years ago

Leo-Ni88 commented 2 years ago

Description

when I open a project some subdirectory are not showing

Neovim version

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

Operating system and version

Linux thinkbook 5.15.0-41-generic #44~20.04.1-Ubuntu SMP Fri Jun 24 13:27:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

nvim-tree version

ecca811

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",
      "kyazdani42/nvim-tree.lua",
      "kyazdani42/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 {
    open_on_setup_file = false,
    view = {
      adaptive_size = true,
      side = "left",
    },
    renderer = {
      -- highlight_git = true,
      highlight_opened_files = "name",
      symlink_destination = false,
      git = {
        unstaged = "✗",
        staged = "✓",
        unmerged = "",
        renamed = "➜",
        untracked = "★",
        deleted = "",
        ignored = "◌",
      },
    },
    git = {
      enable = true,
      ignore = true,
      timeout = 400,
    },
    log = {
      enable = true,
      truncate = true,
      types = {
        all = true,
        profile = true,
        watcher = true,
      },
    },
  }
end

Steps to reproduce

  1. nvim vendor/bouffalolab/chip/bl602/bl602_glb.c -nu /tmp/nvt-min.lua
  2. :NvimTreeOpen
  3. open vendor dir

Expected behavior

image

Actual behavior

image

Leo-Ni88 commented 2 years ago

when i set nvim-tree.git.ignore to false ... image

kyazdani42 commented 2 years ago

closing, since your .gitignore in the vendor folder must ignore these folders. Please see :help nvim-tree.git.ignore

matason commented 9 months ago

Now see :help nvim-tree.filters.git_ignored