neo-tree.nvim icon indicating copy to clipboard operation
neo-tree.nvim copied to clipboard

Invalid window id nui neo tree

Open pratikgajjar opened this issue 2 years ago • 2 comments

Opening folder via nvim causes this error. This might not be related to neo tree but hope someone will help tracing down this window error.

Git repo for nvim config - https://github.com/pratikgajjar/nvim

nvim . 
Error executing vim.schedule lua callback: ...m/site/pack/packer/start/nui.nvim/lua/nui/split/init.lua:147: Invalid window id: 1008
stack traceback:
        [C]: in function 'nvim_set_current_win'
        ...m/site/pack/packer/start/nui.nvim/lua/nui/split/init.lua:147: in function '_open_window'
        ...m/site/pack/packer/start/nui.nvim/lua/nui/split/init.lua:210: in function 'mount'
        .../packer/start/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:825: in function 'create_window'
        .../packer/start/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:947: in function 'draw'
        .../packer/start/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:1084: in function 'show_nodes'
        ...ree.nvim/lua/neo-tree/sources/filesystem/lib/fs_scan.lua:103: in function 'job_complete'
        ...ree.nvim/lua/neo-tree/sources/filesystem/lib/fs_scan.lua:125: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>
Press ENTER or type command to continue

After this I am greeted with empty vim window.

nvim filename

This works without any error and after this if I do :NeoTreeShow then tree shows up without any issue.

pratikgajjar avatar Sep 24 '22 16:09 pratikgajjar

i have the same problem.

justforlxz avatar Sep 25 '22 11:09 justforlxz

I don't have the same problem. I would recommend disabling any startup (like alpha) or session related plugins you have. Something may be killing the window as it opens.

cseickel avatar Sep 25 '22 13:09 cseickel

I found my own cause because I was using telescope file browser, when I disabled this feature, the error disappeared, hope this can help you.

justforlxz avatar Oct 25 '22 03:10 justforlxz

Thank you @justforlxz, That is exactly the solution that solved the problem.

JulianManza avatar Jan 23 '23 21:01 JulianManza

Closing this as solved

nhat-vo avatar Feb 21 '23 15:02 nhat-vo