diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index dabcb8de..e2c08b98 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -29,7 +29,7 @@ return { vim.cmd([[Neotree close]]) end, init = function() - if vim.fn.argc() == 1 then + if vim.fn.argc(-1) == 1 then local stat = vim.loop.fs_stat(vim.fn.argv(0)) if stat and stat.type == "directory" then require("neo-tree")