Wrap auto load in vim.schedule
I'm experiencing a bug whereby if I enable autoloading, I don't get any syntax highlighting on startup (until I trigger it with `:e` for example). I had the same issue with `persistence.nvim` (I made an auto command to get the same functionality). For both plugins, wrapping the call to `load` in `vim.schedule` solved the problem. I don't really know enough about the inner workings of Neovim to explain this though.main
parent
040cf43524
commit
473c90bbb6
|
|
@ -87,7 +87,7 @@ function M.setup(opts)
|
|||
config.setup(opts)
|
||||
setup_commands()
|
||||
if config.options.autoload and (allow_dir() and not ignore_dir()) and vim.fn.argc() == 0 then
|
||||
M.load()
|
||||
vim.schedule(M.load)
|
||||
end
|
||||
if
|
||||
config.options.autosave
|
||||
|
|
|
|||
Loading…
Reference in New Issue