aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_meta/api.lua
diff options
context:
space:
mode:
authorluukvbaal <luukvbaal@gmail.com>2025-07-12 16:46:13 +0200
committerGitHub <noreply@github.com>2025-07-12 07:46:13 -0700
commitd2098057a774167ed2552cb498530a01fc907a84 (patch)
treeea61b559dc6a401e8867638ece10bc8bcd514876 /runtime/lua/vim/_meta/api.lua
parent34fbfa3586c2684b3601c9df3b73c20542545a47 (diff)
downloadrneovim-d2098057a774167ed2552cb498530a01fc907a84.tar.gz
rneovim-d2098057a774167ed2552cb498530a01fc907a84.tar.bz2
rneovim-d2098057a774167ed2552cb498530a01fc907a84.zip
docs(autocmd): generate events enum type #34883
Diffstat (limited to 'runtime/lua/vim/_meta/api.lua')
-rw-r--r--runtime/lua/vim/_meta/api.lua13
1 files changed, 7 insertions, 6 deletions
diff --git a/runtime/lua/vim/_meta/api.lua b/runtime/lua/vim/_meta/api.lua
index 71d188921a..3177244e1a 100644
--- a/runtime/lua/vim/_meta/api.lua
+++ b/runtime/lua/vim/_meta/api.lua
@@ -830,7 +830,7 @@ function vim.api.nvim_chan_send(chan, data) end
--- Clears all autocommands selected by {opts}. To delete autocmds see `nvim_del_autocmd()`.
---
--- @param opts vim.api.keyset.clear_autocmds Parameters
---- - event: (string|table)
+--- - event: (vim.api.keyset.events|vim.api.keyset.events[])
--- Examples:
--- - event: "pat1"
--- - event: { "pat1" }
@@ -939,7 +939,7 @@ function vim.api.nvim_create_augroup(name, opts) end
---
--- @see `:help autocommand`
--- @see vim.api.nvim_del_autocmd
---- @param event any (string|array) Event(s) that will trigger the handler (`callback` or `command`).
+--- @param event vim.api.keyset.events|vim.api.keyset.events[] Event(s) that will trigger the handler (`callback` or `command`).
--- @param opts vim.api.keyset.create_autocmd Options dict:
--- - group (string|integer) optional: autocommand group name or id to match against.
--- - pattern (string|array) optional: pattern(s) to match literally `autocmd-pattern`.
@@ -951,7 +951,7 @@ function vim.api.nvim_create_augroup(name, opts) end
--- value (not `false` or `nil`) to delete the autocommand, and receives one argument, a
--- table with these keys: [event-args]()
--- - id: (number) autocommand id
---- - event: (string) name of the triggered event `autocmd-events`
+--- - event: (vim.api.keyset.events) name of the triggered event `autocmd-events`
--- - group: (number|nil) autocommand group id, if any
--- - file: (string) [<afile>] (not expanded to a full path)
--- - match: (string) [<amatch>] (expanded to a full path)
@@ -1176,7 +1176,7 @@ function vim.api.nvim_exec2(src, opts) end
--- Execute all autocommands for {event} that match the corresponding
--- {opts} `autocmd-execute`.
--- @see `:help :doautocmd`
---- @param event any (String|Array) The event or events to execute
+--- @param event vim.api.keyset.events|vim.api.keyset.events[] The event or events to execute
--- @param opts vim.api.keyset.exec_autocmds Dict of autocommand options:
--- - group (string|integer) optional: the autocommand group name or
--- id to match against. `autocmd-groups`.
@@ -1249,7 +1249,8 @@ function vim.api.nvim_get_all_options_info() end
--- @param opts vim.api.keyset.get_autocmds Dict with at least one of the following:
--- - buffer: (integer) Buffer number or list of buffer numbers for buffer local autocommands
--- `autocmd-buflocal`. Cannot be used with {pattern}
---- - event: (string|table) event or events to match against `autocmd-events`.
+--- - event: (vim.api.keyset.events|vim.api.keyset.events[])
+--- event or events to match against `autocmd-events`.
--- - id: (integer) Autocommand ID to match.
--- - group: (string|table) the autocommand group name or id to match against.
--- - pattern: (string|table) pattern or patterns to match against `autocmd-pattern`.
@@ -1262,7 +1263,7 @@ function vim.api.nvim_get_all_options_info() end
--- - callback: (function|string|nil): Lua function or name of a Vim script function
--- which is executed when this autocommand is triggered.
--- - desc: (string) the autocommand description.
---- - event: (string) the autocommand event.
+--- - event: (vim.api.keyset.events) the autocommand event.
--- - id: (integer) the autocommand id (only when defined with the API).
--- - group: (integer) the autocommand group id.
--- - group_name: (string) the autocommand group name.