neovim: move autocmd out of async loop

setfiletype doesn't trigger when autocmd is lazy loaded
This commit is contained in:
FollieHiyuki 2021-10-01 00:36:04 +07:00
parent 493e7d6c1c
commit 68b4e1d59f
No known key found for this signature in database
GPG Key ID: 813CF484F4993419

View File

@ -2,7 +2,6 @@ local async
async = vim.loop.new_async(vim.schedule_wrap(function() async = vim.loop.new_async(vim.schedule_wrap(function()
require('plugins') require('plugins')
require('mappings') require('mappings')
require('autocmd')
async:close() async:close()
end)) end))
@ -11,4 +10,5 @@ local options = require('options')
options.disable_default_plugins() options.disable_default_plugins()
options.load_options() options.load_options()
require('colors.' .. vim.g.global_theme).highlight() require('colors.' .. vim.g.global_theme).highlight()
require('autocmd')
async:send() async:send()