fix: #8 autoload when neovim opened with arguments

main
olimorris 2022-04-19 13:29:07 +01:00
parent 4863f67101
commit ba5f0ab091
1 changed files with 6 additions and 2 deletions

View File

@ -110,10 +110,14 @@ end
function M.setup(opts) function M.setup(opts)
config.setup(opts) config.setup(opts)
setup_commands() setup_commands()
if config.options.autoload and (allow_dir() and not ignore_dir()) then if config.options.autoload and (allow_dir() and not ignore_dir()) and vim.fn.argc() == 0 then
M.load() M.load()
end end
if config.options.autosave and (allow_dir() and not ignore_dir() and vim.g.persisting == nil) then if
config.options.autosave
and (allow_dir() and not ignore_dir() and vim.g.persisting == nil)
and vim.fn.argc() == 0
then
M.start() M.start()
end end
end end