mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
Fixed: Neotree isn't properly invoked when a directory is given at launch
When a directory is given at lunch through argument e.g. "nvim .", LazyVim opens Neo-tree side window instead of the dashboard. However, the instance isn't fully initialized: if one opens a file directly from Neotree, the tree buffer will be override by that file. And toggling Neotree will then result in error "failed to rename the buffer". Manually toggling Neotree can solve this issue.
This commit is contained in:
parent
97480dc5d2
commit
11727650ea
1 changed files with 1 additions and 0 deletions
|
|
@ -45,6 +45,7 @@ return {
|
||||||
local stat = vim.uv.fs_stat(vim.fn.argv(0))
|
local stat = vim.uv.fs_stat(vim.fn.argv(0))
|
||||||
if stat and stat.type == "directory" then
|
if stat and stat.type == "directory" then
|
||||||
require("neo-tree")
|
require("neo-tree")
|
||||||
|
vim.cmd("Neotree toggle")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue