diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2025-03-18 06:18:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-18 06:18:37 -0700 |
commit | 7333c39e6cc78786289d88c65fbe10e4ce78992b (patch) | |
tree | af0deb9a02b82c19e6bf89e2b5bc8fb9123dd5d5 /src/nvim/api/autocmd.c | |
parent | 29a47b39ccd0317e815632439966f0f1343d96cf (diff) | |
download | rneovim-7333c39e6cc78786289d88c65fbe10e4ce78992b.tar.gz rneovim-7333c39e6cc78786289d88c65fbe10e4ce78992b.tar.bz2 rneovim-7333c39e6cc78786289d88c65fbe10e4ce78992b.zip |
docs: misc #32959
Diffstat (limited to 'src/nvim/api/autocmd.c')
-rw-r--r-- | src/nvim/api/autocmd.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/nvim/api/autocmd.c b/src/nvim/api/autocmd.c index d436dbb7f1..1e33b0b62a 100644 --- a/src/nvim/api/autocmd.c +++ b/src/nvim/api/autocmd.c @@ -53,14 +53,14 @@ static int64_t next_autocmd_id = 1; /// ```lua /// -- Matches all criteria /// autocommands = vim.api.nvim_get_autocmds({ -/// group = "MyGroup", -/// event = {"BufEnter", "BufWinEnter"}, -/// pattern = {"*.c", "*.h"} +/// group = 'MyGroup', +/// event = {'BufEnter', 'BufWinEnter'}, +/// pattern = {'*.c', '*.h'} /// }) /// /// -- All commands from one group /// autocommands = vim.api.nvim_get_autocmds({ -/// group = "MyGroup", +/// group = 'MyGroup', /// }) /// ``` /// @@ -336,8 +336,8 @@ cleanup: /// Example using Lua callback: /// /// ```lua -/// vim.api.nvim_create_autocmd({"BufEnter", "BufWinEnter"}, { -/// pattern = {"*.c", "*.h"}, +/// vim.api.nvim_create_autocmd({'BufEnter', 'BufWinEnter'}, { +/// pattern = {'*.c', '*.h'}, /// callback = function(ev) /// print(string.format('event fired: %s', vim.inspect(ev))) /// end @@ -347,8 +347,8 @@ cleanup: /// Example using an Ex command as the handler: /// /// ```lua -/// vim.api.nvim_create_autocmd({"BufEnter", "BufWinEnter"}, { -/// pattern = {"*.c", "*.h"}, +/// vim.api.nvim_create_autocmd({'BufEnter', 'BufWinEnter'}, { +/// pattern = {'*.c', '*.h'}, /// command = "echo 'Entering a C or C++ file'", /// }) /// ``` @@ -357,7 +357,7 @@ cleanup: /// and "~" must be expanded explicitly: /// /// ```lua -/// pattern = vim.fn.expand("~") .. "/some/path/*.py" +/// pattern = vim.fn.expand('~') .. '/some/path/*.py' /// ``` /// /// @param event (string|array) Event(s) that will trigger the handler (`callback` or `command`). @@ -603,7 +603,7 @@ void nvim_clear_autocmds(Dict(clear_autocmds) *opts, Arena *arena, Error *err) /// To get an existing group id, do: /// /// ```lua -/// local id = vim.api.nvim_create_augroup("MyGroup", { +/// local id = vim.api.nvim_create_augroup('my.lsp.config', { /// clear = false /// }) /// ``` |