kyazdani42 / nvim-tree.lua

A file explorer tree for neovim written in lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

'fs_scandir_next' (uv_req expected, got nil)

strogiyotec opened this issue · comments

OS
Ubuntu 20.04

Neovim version
NVIM v0.7.0-dev+755-g1062ea2cc

Nvim-tree version
latest one (PlugUpdate)

Describe the bug
When I open nvim I see this error every time

Error executing vim.schedule lua callback: ...ig/nvim/plugged/nvim-tree.lua/lua/nvim-t
ree/populate.lua:292: bad argument #1 to 'fs_scandir_next' (uv_req expected, got nil)
stack traceback:
        [C]: in function 'fs_scandir_next'

My nvim-tree config

require'nvim-tree'.setup {
  -- disables netrw completely,
  disable_netrw       = true,
  -- hijack netrw window on startup
  hijack_netrw        = true,
  -- open the tree when running this setup function
  open_on_setup       = false,
  -- will not open on setup if the filetype is in this list
  ignore_ft_on_setup  = {},
  -- closes neovim automatically when the tree is the last **WINDOW** in the view
  auto_close          = false,
  -- opens the tree when changing/opening a new tab if the tree wasn't previously opened
  open_on_tab         = false,
  -- hijack the cursor in the tree to put it at the start of the filename
  hijack_cursor       = false,
  -- updates the root directory of the tree on `DirChanged` (when your run `:cd` usually) 
  update_cwd          = false,
  -- show lsp diagnostics in the signcolumn
  diagnostics = {
    enable = false,
    icons = {
      hint = "",
      info = "",
      warning = "",
      error = "",
    }
  },
  -- update the focused file on `BufEnter`, un-collapses the folders recursively until it finds the file
  update_focused_file = {
    -- enables the feature
    enable      = false,
    -- update the root directory of the tree to the one of the folder containing the file if the file is not under the current root directory
    -- only relevant when `update_focused_file.enable` is true
    update_cwd  = false,
    -- list of buffer names / filetypes that will not update the cwd if the file isn't found under the current root directory
    -- only relevant when `update_focused_file.update_cwd` is true and `update_focused_file.enable` is true
    ignore_list = {}
  },
  -- configuration options for the system open command (`s` in the tree by default)
  system_open = {
    -- the command to run this, leaving nil should work in most cases
    cmd  = nil,
    -- the command arguments as a list
    args = {}
  },

  view = {
    -- width of the window, can be either a number (columns) or a string in `%`
    width = 30,
    -- side of the tree, can be one of 'left' | 'right' | 'top' | 'bottom'
    side = 'left',
    -- if true the tree will resize itself after opening a file
    auto_resize = false,
    mappings = {
      -- custom only false will merge the list with the default mappings
      -- if true, it will only use your list to set the mappings
      custom_only = false,
      -- list of mappings to set on the tree manually
      list = {}
    }
  }
}

Hi ! This looks like a bug to me, but impossible to reproduce on my end.
Could you tell me what kind of folder did you open neovim in (sshfs, readonly fs...) ? Or maybe if a foldername has a weird character in it ?

@kyazdani42 Hm , I just tried it today and now I don't have this issue anymore, literally didn't change anything related to nvim config. Will close an issue

ezoic increase your site revenue