neo-tree.nvim
neo-tree.nvim copied to clipboard
BUG: Crash when filtering
Did you check docs and existing issues?
- [X] I have read all the docs.
- [X] I have searched the existing issues.
- [X] I have searched the existing discussions.
Neovim Version (nvim -v)
NVIM v0.9.1
Operating System / Version
MacOs 13.4.1
Describe the Bug
The neo-tree crashes when trying to search files. Afterwards it is required to restart the Neovim to be able to use the neo-tree again.
Screenshots, Traceback
E5108: Error executing lua: ...are/nvim/lazy/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:1076: Key not found: neo_tree_position stack traceback: [C]: in function 'nvim_buf_get_var' ...are/nvim/lazy/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:1076: in function 'window_exists' ...are/nvim/lazy/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:120: in function 'close' ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/command/init.lua:85: in function 'execute' ...l/share/nvim/lazy/LazyVim/lua/lazyvim/plugins/editor.lua:21: in function <...l/share/nvim/lazy/LazyVim/lua/lazyvim/plugins/editor.lua:20>
[Neo-tree ERROR] Error in event handler for event vim_buffer_modified_set[filesystem.vim_buffer_modified_set]: ...are/nvim/lazy/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:1076: Key not found: neo_tree_position
With repro.lua:
Error executing vim.schedule lua callback: ...xxx/Temp/.repro/plugins/plenary.nvim/lua/plenary/job.lua:404: Failed to spawn process: {
_additional_on_exit_callbacks = {},
_shutdown_check = <userdata 1>,
_stderr_results = {},
_stdout_results = {},
_user_on_exit = <function 1>,
_user_on_start = <function 2>,
args = { "-C", "/Users/xxxxx/STM32Cube/Repository/STM32Cube_FW_H7_V1.10.0/Middlewares/Third_Party/FatFs/doc", "check-ignore", "--stdin" },
command = "git",
enable_handlers = true,
enable_recording = true,
interactive = true,
pid = "EMFILE: too many open files",
stderr = <userdata 2>,
stdin = <userdata 3>,
stdout = <userdata 4>,
user_data = {},
writer = { "/Users/xxxxx/STM32Cube/Repository/STM32Cube_FW_H7_V1.10.0/Middlewares/Third_Party/FatFs/doc/res" },
Steps to Reproduce
- Vanilla LazyVim
- Start nvim in ~/.config/nvim
- 2 *
to home folder - Filter /.xml (or it doesn't really matter. Sometimes works, most of the time crashes)
Expected Behavior
Should show only the filtered files and not crash
Your Configuration
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
"folke/tokyonight.nvim",
-- add any other plugins here
}
local neotree_config = {
"nvim-neo-tree/neo-tree.nvim",
dependencies = { "MunifTanjim/nui.nvim", "nvim-tree/nvim-web-devicons", "nvim-lua/plenary.nvim" },
cmd = { "Neotree" },
keys = {
{ "<Leader>e", "<Cmd>Neotree<CR>" }, -- change or remove this line if relevant.
},
opts = {
-- Your config here
-- ...
},
}
table.insert(plugins, neotree_config)
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here
Using the provided reproduction configuration, I am not able to recreate this issue
Tested both on nvim 0.9.1 (stable) and a nightly nvim 0.10 on linux and windows. Can you try with a fresh install of nvim 0.9.1 and run without LazyVim? The command would simply be
$ nvim --clean -u YOUR_REPRODUCTION_CONFIG.lua
This may be an issue with mac but I am unsure and I don't have a mac (or macos vm) that I can test on unfortunately
Potentially (likely) related to #1046