Open dkumza opened 5 months ago
Nui.nvim is a necessary dependency for neo-tree.
Please follow the install instructions here: https://github.com/nvim-neo-tree/neo-tree.nvim?tab=readme-ov-file#minimal-example-for-lazy
this is my neo-tree.lua
return { "nvim-neo-tree/neo-tree.nvim", branch = "v3.x", dependencies = { "nvim-lua/plenary.nvim", "nvim-tree/nvim-web-devicons", "MunifTanjim/nui.nvim", }, config = function() local builtin = require('neo-tree') vim.keymap.set("n", "<C-n>", ":Neotree source=filesystem reveal=true position=left <CR>", {}) end }
Now I removed everything from that file and added again config. This error disapeared, but still cant use properly tree On 1st nvim startup i can't use C-n, it wont open tree. But if i write with hand :Neo... its working till i completly shut down my CLI tool.
This is because lazy.nvim is lazy loading neo-tree and config
is only called after you load neo-tree and therefore keymap.set
is also triggered only after neo-tree is loaded.
Please refer to the lazy.nvim README for more information but you should define key maps with the keys
field in the plugin spec.
Did you check docs and existing issues?
Neovim Version (nvim -v)
0.9.5
Operating System / Version
Fedora 39
Describe the Bug
E5108: Error executing lua ...are/nvim/lazy/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:2: module 'nui.line' not found: no field package.preload['nui.line'] cache_loader: module nui.line not found cache_loader_lib: module nui.line not found no file './nui/line.lua' no file '/usr/share/luajit-2.1/nui/line.lua' no file '/usr/local/share/lua/5.1/nui/line.lua' no file '/usr/local/share/lua/5.1/nui/line/init.lua' no file '/usr/share/lua/5.1/nui/line.lua' no file '/usr/share/lua/5.1/nui/line/init.lua' no file './nui/line.so' no file '/usr/local/lib/lua/5.1/nui/line.so' no file '/usr/lib64/lua/5.1/nui/line.so' no file '/usr/local/lib/lua/5.1/loadall.so' no file './nui.so' no file '/usr/local/lib/lua/5.1/nui.so' no file '/usr/lib64/lua/5.1/nui.so' no file '/usr/local/lib/lua/5.1/loadall.so' stack traceback: [C]: in function 'require' ...are/nvim/lazy/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:2: in main chunk [C]: in function 'require' ...ree.nvim/lua/neo-tree/sources/filesystem/lib/fs_scan.lua:4: in main chunk [C]: in function 'require' ...nvim/lazy/neo-tree.nvim/lua/neo-tree/sources/manager.lua:6: in main chunk [C]: in function 'require' ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/command/init.lua:3: in main chunk [C]: in function 'require' [string ":lua"]:1: in main chunk
Screenshots, Traceback
No response
Steps to Reproduce
1 from init.lue to ~/.config/nvim/lua/plugins 2 cant call :Neotree
Expected Behavior
should open tree
Your Configuration