You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With NvimTree open, when I open a file (with Telescope oldfiles) in a child project directory of the root directory and this child project directory is a git repository then I get the following error.
Error executing vim.schedule lua callback: ...r/start/nvim-tree.lua/lua/nvim-tree/explorer/explore.lua:69: attempt to perform
arithmetic on a nil value
stack traceback:
...r/start/nvim-tree.lua/lua/nvim-tree/explorer/explore.lua:69: in function 'populate_children'
...r/start/nvim-tree.lua/lua/nvim-tree/explorer/explore.lua:92: in function 'explore'
...cker/start/nvim-tree.lua/lua/nvim-tree/explorer/init.lua:267: in function '_load'
...cker/start/nvim-tree.lua/lua/nvim-tree/explorer/init.lua:73: in function 'expand'
...vim-tree.lua/lua/nvim-tree/actions/finders/find-file.lua:66: in function '_apply_fn_on_node'
.../nvim-tree.lua/lua/nvim-tree/iterators/node-iterator.lua:63: in function 'iter'
.../nvim-tree.lua/lua/nvim-tree/iterators/node-iterator.lua:66: in function 'iterate'
...vim-tree.lua/lua/nvim-tree/actions/finders/find-file.lua:76: in function 'fn'
...t/nvim-tree.lua/lua/nvim-tree/actions/tree/find-file.lua:64: in function 'fn'
...n/site/pack/packer/start/nvim-tree.lua/lua/nvim-tree.lua:280: in function 'callback'
.../pack/packer/start/nvim-tree.lua/lua/nvim-tree/utils.lua:455: in function <.../pack/packer/start/nvim-tree.lua/lua
/nvim-tree/utils.lua:454>
The only way I know that can trigger this error is when I open a file with :Telescope oldfiles, it doesn't error if I open with other ways, e.g. open with :e or :Telescope find_files. A little bizarre and I'm not sure why that particular usage triggers this issue. Note also I've only reproduced this issue when the child directory is a git repository. This usage happens to be a very common usage for me. I open nvim in parent directory that has many git repositories, I open NvimTree first (out of habit, and actually if I open nvim-tree after I open the file I don't get the error) and then open a recently opened file. I only started seeing this error only started happening recently, perhaps in the last week or so.
I reduced the nvim tree config to a configuration where this error still happens.
Error executing vim.schedule lua callback: ...r/start/nvim-tree.lua/lua/nvim-tree/explorer/explore.lua:69: attempt to perform
arithmetic on a nil value
stack traceback:
...r/start/nvim-tree.lua/lua/nvim-tree/explorer/explore.lua:69: in function 'populate_children'
...r/start/nvim-tree.lua/lua/nvim-tree/explorer/explore.lua:92: in function 'explore'
...cker/start/nvim-tree.lua/lua/nvim-tree/explorer/init.lua:267: in function '_load'
...cker/start/nvim-tree.lua/lua/nvim-tree/explorer/init.lua:73: in function 'expand'
...vim-tree.lua/lua/nvim-tree/actions/finders/find-file.lua:66: in function '_apply_fn_on_node'
.../nvim-tree.lua/lua/nvim-tree/iterators/node-iterator.lua:63: in function 'iter'
.../nvim-tree.lua/lua/nvim-tree/iterators/node-iterator.lua:66: in function 'iterate'
...vim-tree.lua/lua/nvim-tree/actions/finders/find-file.lua:76: in function 'fn'
...t/nvim-tree.lua/lua/nvim-tree/actions/tree/find-file.lua:64: in function 'fn'
...n/site/pack/packer/start/nvim-tree.lua/lua/nvim-tree.lua:280: in function 'callback'
.../pack/packer/start/nvim-tree.lua/lua/nvim-tree/utils.lua:455: in function <.../pack/packer/start/nvim-tree.lua/lua
/nvim-tree/utils.lua:454>
The text was updated successfully, but these errors were encountered:
ianhomer
changed the title
attempt to perform arithmetic on a nil value error
Error attempt to perform arithmetic on a nil value error when opening file in child git repo with NvimTree Open
Sep 13, 2024
ianhomer
changed the title
Error attempt to perform arithmetic on a nil value error when opening file in child git repo with NvimTree Open
attempt to perform arithmetic on a nil value error when opening file in child git repo with NvimTree Open
Sep 13, 2024
ianhomer
changed the title
attempt to perform arithmetic on a nil value error when opening file in child git repo with NvimTree Open
Arithmetic on a nil value error when opening file in child git repo with NvimTree Open
Sep 13, 2024
Description
With NvimTree open, when I open a file (with Telescope oldfiles) in a child project directory of the root directory and this child project directory is a git repository then I get the following error.
The only way I know that can trigger this error is when I open a file with
:Telescope oldfiles
, it doesn't error if I open with other ways, e.g. open with:e
or:Telescope find_files
. A little bizarre and I'm not sure why that particular usage triggers this issue. Note also I've only reproduced this issue when the child directory is a git repository. This usage happens to be a very common usage for me. I open nvim in parent directory that has many git repositories, I open NvimTree first (out of habit, and actually if I open nvim-tree after I open the file I don't get the error) and then open a recently opened file. I only started seeing this error only started happening recently, perhaps in the last week or so.I reduced the nvim tree config to a configuration where this error still happens.
If I remove either of those configuration the error does not happen anymore.
This error occurs after the fix for bugs with similar error signal was merged, i.e. after #2874 which fixed #2868 and #2866
Candidate fix created at #2907
Neovim version
Operating system and version
MacOS
Windows variant
No response
nvim-tree version
d41b4ca
Clean room replication
Steps to reproduce
Expected behavior
No error thrown
Actual behavior
I get the error
The text was updated successfully, but these errors were encountered: