From 92349b1db0039aac3a43089d0aade2437164505c Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Sun, 6 Mar 2022 12:35:14 -0700 Subject: feat(api): add 'buffer' argument to nvim_get_autocmds (#17594) This enables retrieving autocommands defined in the given buffers. Under the hood this simply translates the buffer numbers into '' patterns. --- runtime/doc/api.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'runtime') diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index fe5f9eaf35..73536d174a 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -3226,7 +3226,11 @@ nvim_get_autocmds({*opts}) *nvim_get_autocmds()* against • group (string): Name of group to match against • pattern: Pattern or list of patterns to match - against + against. Cannot be used with {buffer} + • buffer: Buffer number or list of buffer numbers + for buffer local autocommands + |autocmd-buflocal|. Cannot be used with + {pattern} Return: ~ A list of autocmds that match -- cgit