-
-
Notifications
You must be signed in to change notification settings - Fork 610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nvim-tree/explorer/init.lua:66: attempt to index field 'uv' (a nil value) #2976
Comments
I'm having the same issue when I do |
I did some quick in-place hacking to be able to get back to work, perhaps it helps diff --git a/lua/nvim-tree/explorer/init.lua b/lua/nvim-tree/explorer/init.lua
index 4cc511b..716765c 100644
--- a/lua/nvim-tree/explorer/init.lua
+++ b/lua/nvim-tree/explorer/init.lua
@@ -63,8 +63,10 @@ function Explorer:create(path)
o.explorer = o
- o.uid_explorer = vim.uv.hrtime()
- o.augroup_id = vim.api.nvim_create_augroup("NvimTree_Explorer_" .. o.uid_explorer, {})
+ if vim.uv then
+ o.uid_explorer = vim.uv.hrtime()
+ o.augroup_id = vim.api.nvim_create_augroup("NvimTree_Explorer_" .. o.uid_explorer, {})
+ end
o.open = true
o.opts = config
@@ -114,7 +116,7 @@ function Explorer:create_autocmds()
vim.api.nvim_create_autocmd("BufReadPost", {
group = self.augroup_id,
callback = function(data)
- if (self.filters.config.filter_no_buffer or self.opts.highlight_opened_files ~= "none") and vim.bo[data.buf].buftype == "" then
+ if (self.uid_explorer and (self.filters.config.filter_no_buffer or self.opts.highlight_opened_files ~= "none")) and vim.bo[data.buf].buftype == "" then
utils.debounce("Buf:filter_buffer_" .. self.uid_explorer, self.opts.view.debounce_delay, function()
self:reload_explorer()
end)
@@ -168,7 +170,8 @@ function Explorer:create_autocmds()
})
end
- if self.opts.modified.enable then
+ if self.opts.modified.enable and self.uid_explorer then
vim.api.nvim_create_autocmd({ "BufModifiedSet", "BufWritePost" }, {
group = self.augroup_id,
callback = function()
|
I should point out that this isn't a fix, it just avoids the errors I've run into.
|
Found this in neovim repo. It seems we need neovim 0.10 for Update: I ended up upgrading from Fedora 39 to Fedora 40 and now I have access to neovim 0.10. For me this is no longer an issue. |
Many thanks all for finding this one. Used |
Description
nvim-tree/explorer/init.lua:66: attempt to index field 'uv' (a nil value).
Neovim version
Operating system and version
Windows 10
Windows variant
WSL1
nvim-tree version
8f97487
Clean room replication
Steps to reproduce
This error occurs after :NvimTreeToggle
Expected behavior
open file tree normally.
Actual behavior
No response
The text was updated successfully, but these errors were encountered: