aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/autocmd_spec.lua
Commit message (Collapse)AuthorAge
* docs: small fixes (#25585)dundargoc2023-10-29
| | | | Co-authored-by: tmummert <doczook@gmx.de> Co-authored-by: parikshit adhikari <parikshitadhikari@gmail.com>
* fix(autocmd): API functions accept garbage after event name #25523ii142023-10-09
| | | | | | | "VimEnter foo" was accepted as a valid event name for "VimEnter". Events delimited with commas, eg. "VimEnter,BufRead", were also accepted, even though only the first event was actually parsed. Co-authored-by: ii14 <ii14@users.noreply.github.com>
* test(api): update tests to new error messagesbfredl2023-08-07
|
* fix(events): don't expand non-file as file namezeertzjq2023-06-07
|
* fix(api): avoid assertion when autocmd group id is 0 (#23210)Dhruv Manilawala2023-04-23
|
* Merge #22214 move init_default_autocmds to luaJustin M. Keyes2023-02-14
|\
| * refactor: move init_default_autocmds to luaglacambre2023-02-11
| | | | | | | | | | | | | | | | | | The original motivation for this change came from developping https://github.com/neovim/neovim/pull/22159, which will require adding more autocommand creation to Neovim's startup sequence. This change requires lightly editing a test that expected no autocommand to have been created from lua.
* | refactor(api): consistent VALIDATE messages #22262Justin M. Keyes2023-02-14
| | | | | | | | | | | | | | | | | | | | Problem: Validation messages are not consistently formatted. - Parameter names sometimes are NOT quoted. - Descriptive names (non-parameters) sometimes ARE quoted. Solution: Always quote the `name` value passed to a VALIDATE macro _unless_ the value has whitespace.
* | refactor(api): VALIDATE macros #22256Justin M. Keyes2023-02-14
| | | | | | | | | | | | - VALIDATE() takes a format string - deduplicate check_string_array - VALIDATE_RANGE - validate UI args
* | refactor(api): VALIDATE macros #22187Justin M. Keyes2023-02-14
|/ | | | | | | | | Problem: - API validation involves too much boilerplate. - API validation errors are not consistently worded. Solution: Introduce some macros. Currently these are clumsy, but they at least help with consistency and avoid some nesting.
* fix(api): nvim_create_autocmd crash on invalid types inside pattern arrayii142023-01-12
| | | Co-authored-by: ii14 <ii14@users.noreply.github.com>
* docs #20986Justin M. Keyes2022-12-11
| | | | | | - https://github.com/neovim/tree-sitter-vimdoc v1.2.4 eliminates most errors in pi_netrw.txt, so we can remove that workaround from ignore_parse_error(). - improved codeblock
* feat(api): support pattern array for exec_autocmdsChristian Clason2022-06-26
|
* feat(autocmds): retrieve lua callback (#18642)kylo2522022-06-09
| | | add a new `callback` field to `nvim_get_autocmds`
* fix(autocmds): separate command from desc (#18617)kylo2522022-05-21
|
* feat(api): enable nvim_exec_autocmds to pass arbitrary data (#18613)Gregory Anders2022-05-18
| | | | Add a "data" key to nvim_exec_autocmds that passes arbitrary data (API objects) to autocommand callbacks.
* feat(api): add `group_name` to `nvim_get_autocmds`Famiu Haque2022-05-05
|
* test: correct order of arguments to eq() and neq()zeertzjq2022-04-26
|
* feat(api)!: pass args table to autocommand callbacksGregory Anders2022-04-08
|
* Merge pull request #17938 from ggandor/autocmd-api-namesbfredl2022-04-01
|\ | | | | refactor(api)!: use singular/plural consistently in the autocmd API
| * refactor(api)!: use singular/plural consistently in the autocmd APIGyörgy Andorka2022-03-31
| |
* | Merge pull request #17929 from lewis6991/autocmdbfredl2022-03-31
|\ \ | |/ |/| fix(api): improve autocmd error handling
| * fix(api): improve autocmd error handlingLewis Russell2022-03-31
| | | | | | | | | | - nvim_del_augroup_* now works with pcall - nvim_del_autocmd now errors for invalid ids
* | feat(api): nvim_clear_autocmdTJ DeVries2022-03-31
|/ | | | Co-authored-by: Christian Clason <christian.clason@uni-due.de>
* fix: set nested before executing callback (#17801)TJ DeVries2022-03-30
|
* refactor!: rename nvim_do_autocmd to nvim_exec_autocmd (#17854)Javier Lopez2022-03-26
| | | according to established code standards (`:h dev-api`)
* feat(api): remove Lua autocommand callbacks when they return true (#17784)Gregory Anders2022-03-19
| | | | This copies the semantics of nvim_buf_attach callbacks, and is a convenient way to create oneshot autocommands gated by some condition.
* feat(api): autocmd `group` can be either name or id (#17559)Dhruv Manilawala2022-03-07
| | | | | | | | | | | | | | | | | | | | | | | | * feat(api): `group` can be either string or int This affects the following API functions: - `vim.api.nvim_create_autocmd` - `vim.api.nvim_get_autocmds` - `vim.api.nvim_do_autocmd` closes #17552 * refactor: add two maps for fast lookups * fix: delete augroup info from id->name map When in "stupid_legacy_mode", the value in name->id map would be updated to `AUGROUP_DELETED`, but the entry would still remain in id->name. This would create a problem in `augroup_name` function which would return the name of the augroup instead of `--DELETED--`. The id->name map is only used for fast loopup in `augroup_name` function so there's no point in keeping the entry of deleted augroup in it. Co-authored-by: TJ DeVries <devries.timothyj@gmail.com>
* feat(api): add 'buffer' argument to nvim_get_autocmds (#17594)Gregory Anders2022-03-06
| | | | | This enables retrieving autocommands defined in the given buffers. Under the hood this simply translates the buffer numbers into '<buffer=%d>' patterns.
* fix(api): include event in get_autocmds (#17553)Christian Clason2022-03-01
|
* feat(lua): add missing changes to autocmds lost in the rebaseTJ DeVries2022-02-28
| | | | Note: some of these changes are breaking, like change of API signatures
* feat(lua): add api and lua autocmdsTJ DeVries2022-02-27