feat(api): enable nvim_exec_autocmds to pass arbitrary data (#18613)

Add a "data" key to nvim_exec_autocmds that passes arbitrary data (API
objects) to autocommand callbacks.
This commit is contained in:
Gregory Anders
2022-05-18 09:51:26 -06:00
committed by GitHub
parent d7dd600716
commit 8a9ab88945
6 changed files with 56 additions and 6 deletions

View File

@@ -3469,6 +3469,8 @@ nvim_create_autocmd({event}, {*opts}) *nvim_create_autocmd()*
• buf: (number) the expanded value of |<abuf>|
• file: (string) the expanded value of
|<afile>|
• data: (any) arbitrary data passed to
|nvim_exec_autocmds()|
• command (string) optional: Vim command to
execute on event. Cannot be used with
@@ -3544,6 +3546,9 @@ nvim_exec_autocmds({event}, {*opts}) *nvim_exec_autocmds()*
• modeline (bool) optional: defaults to true.
Process the modeline after the autocommands
|<nomodeline>|.
• data (any): arbitrary data to send to the
autocommand callback. See
|nvim_create_autocmd()| for details.
See also: ~
|:doautocmd|