refactor: move init_default_autocmds to lua

The original motivation for this change came from developping
https://github.com/neovim/neovim/pull/22159, which will require adding
more autocommand creation to Neovim's startup sequence.

This change requires lightly editing a test that expected no autocommand
to have been created from lua.
This commit is contained in:
glacambre
2023-02-11 09:45:11 +01:00
parent 5ca6cf55f9
commit c5b34fa554
4 changed files with 24 additions and 36 deletions

View File

@@ -209,7 +209,7 @@ describe('autocmd api', function()
local aus = meths.get_autocmds({ event = 'User', pattern = 'Test' })
local first = aus[1]
eq(first.id, 1)
eq(true, first.id > 0)
meths.set_var("some_condition", true)
meths.exec_autocmds("User", {pattern = "Test"})