- Rename builtin_callbacks to default_callbacks and slightly change its
semantics:
- No longer contains the default implementations. Instead, any
default_callbacks will be used in preference for our .buf methods.
- Add this to the docs.
Mainly configuration and RPC infrastructure can be considered "done". Specific requests and their callbacks will be improved later (and also served by plugins). There are also some TODO:s for the client itself, like incremental updates.
Co-authored by at-tjdevries and at-h-michael, with many review/suggestion contributions.
We often want to do type checking of public function arguments.
- test: Rename utility_function_spec.lua to vim_spec.lua
- .luacov: Map lua module names
It's a bit cumbersome for us to add an export target every time we define a new function.
It's also cumbersome to care about the order of definition when creating a new function by referring to other functions in the module.
- Rename `meth_pcall`.
- Make `pcall_err` raise an error if the function does not fail.
- Add `vim.pesc()` to treat a string as literal where a Lua pattern is
expected.
This is where "pure functions" can live, which can be shared by Nvim and
test logic which may not have a running Nvim instance available.
If in the future we use Nvim itself as the Lua engine for tests, then
these functions could be moved directly onto the `vim` Lua module.
closes#6580
ref #9280
Introduce the `vim.compat` module, to help environments with system Lua
5.2+ run the build/tests. Include the module implicitly in all tests.
ref #8677
legacy `vim` module:
beep
buffer
command
dict
eval
firstline
lastline
line
list
open
type
window