mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 22:48:34 +00:00
docs(autocmd): generate events enum type #34883
This commit is contained in:
@@ -141,8 +141,12 @@ local function process_proto(item, state)
|
||||
cur_obj.params = cur_obj.params or {}
|
||||
|
||||
for _, p in ipairs(item.parameters) do
|
||||
local param = { name = p[2], type = api_type(p[1]) }
|
||||
local event_type = 'vim.api.keyset.events|vim.api.keyset.events[]'
|
||||
local event = (item.name == 'nvim_create_autocmd' or item.name == 'nvim_exec_autocmds')
|
||||
and p[2] == 'event'
|
||||
local param = { name = p[2], type = event and event_type or api_type(p[1]) }
|
||||
local added = false
|
||||
|
||||
for _, cp in ipairs(cur_obj.params) do
|
||||
if cp.name == param.name then
|
||||
cp.type = param.type
|
||||
|
Reference in New Issue
Block a user