nvim-tree / nvim-tree.lua

A file explorer tree for neovim written in lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't open directory in nvim-tree when using lazy.nvim?

Ciel-MC opened this issue · comments

commented

I recently migrated from Packer to lazy.nvim, but now when I launch nvim in a directory(e.g. nvim ~/.config/nvim), it opens the directory as a blank buffer, like this:
image

If I switch to the only buffer available in telescope, the file explorer opens normally.
This behavior only seems to happen when I switched to lazy.nvim(even though I have nvim-tree as lazy = false)

NVIM v0.9.0-dev-874+g5c4b503d3c
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3

Linux 6.1.9-arch1-1

Hello, I had the exact same problem after I migrated to Lazy. I don't know what causes this issue but the solution is to configure nvim-tree to open on startup. Recently they have introduced a new way to do this which you could find here: Open-At-Startup
This fixed the issue for me.

Changing plugin manager must have coincided with that breaking change being introduced. Link above is the answer. Thanks!

Lazy loading was extremely problematic with the old open on setup behaviour and the "straw that broke the camel's back".