From 8a9ab88945cdabcbd23f23406353ec6110fefa83 Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Wed, 18 May 2022 09:51:26 -0600 Subject: 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. --- runtime/doc/api.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'runtime') diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 86ec05417c..7c669e3c9d 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -3469,6 +3469,8 @@ nvim_create_autocmd({event}, {*opts}) *nvim_create_autocmd()* • buf: (number) the expanded value of || • file: (string) the expanded value of || + • 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 ||. + • data (any): arbitrary data to send to the + autocommand callback. See + |nvim_create_autocmd()| for details. See also: ~ |:doautocmd| -- cgit