| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
Problem:
nvim_get_autocmds cannot filter by id.
Solution:
Support it.
|
|
|
|
|
|
|
|
| |
Problem: In an autocommand Lua callback whether `args.file` is expanded
depends on whether `expand('<afile>')` has been called.
Solution: Always use the unexpanded file name for `args.file`.
Related to #31306 and vim/vim#16106. This doesn't provide `sfname`, but
at least makes `args.file` have a consistent value.
|
|
|
|
|
|
|
|
|
| |
Specifically, functions that are run in the context of the test runner
are put in module `test/testutil.lua` while the functions that are run
in the context of the test session are put in
`test/functional/testnvim.lua`.
Closes https://github.com/neovim/neovim/issues/27004.
|
| |
|
|
|
| |
Also remove unnecessary variable in API converter.
|
| |
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/27004.
|
| |
|
|
|
|
|
| |
- remove helpers.cur*meths
- remove helpers.nvim
|
| |
|
| |
|
|
|
|
| |
Co-authored-by: tmummert <doczook@gmx.de>
Co-authored-by: parikshit adhikari <parikshitadhikari@gmail.com>
|
|
|
|
|
|
|
| |
"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>
|
| |
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
- VALIDATE() takes a format string
- deduplicate check_string_array
- VALIDATE_RANGE
- validate UI args
|
|/
|
|
|
|
|
|
|
| |
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.
|
|
|
| |
Co-authored-by: ii14 <ii14@users.noreply.github.com>
|
|
|
|
|
|
| |
- 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
|
| |
|
|
|
| |
add a new `callback` field to `nvim_get_autocmds`
|
| |
|
|
|
|
| |
Add a "data" key to nvim_exec_autocmds that passes arbitrary data (API
objects) to autocommand callbacks.
|
| |
|
| |
|
| |
|
|\
| |
| | |
refactor(api)!: use singular/plural consistently in the autocmd API
|
| | |
|
|\ \
| |/
|/| |
fix(api): improve autocmd error handling
|
| |
| |
| |
| |
| | |
- nvim_del_augroup_* now works with pcall
- nvim_del_autocmd now errors for invalid ids
|
|/
|
|
| |
Co-authored-by: Christian Clason <christian.clason@uni-due.de>
|
| |
|
|
|
| |
according to established code standards (`:h dev-api`)
|
|
|
|
| |
This copies the semantics of nvim_buf_attach callbacks, and is a
convenient way to create oneshot autocommands gated by some condition.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
| |
This enables retrieving autocommands defined in the given buffers. Under
the hood this simply translates the buffer numbers into '<buffer=%d>'
patterns.
|
| |
|
|
|
|
| |
Note: some of these changes are breaking, like change of API signatures
|
|
|