diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-10-27 20:49:03 +0100 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2019-11-10 13:08:05 +0100 |
commit | 474d0bcbf724c7eed740f60391a0ed35d651e1d3 (patch) | |
tree | 2a609072157fd975cea1d5f0c4c99ebdd0eca2c3 /runtime/doc/if_lua.txt | |
parent | 5689008060d29dd7b45157a8f82cb96018c284e8 (diff) | |
download | rneovim-474d0bcbf724c7eed740f60391a0ed35d651e1d3.tar.gz rneovim-474d0bcbf724c7eed740f60391a0ed35d651e1d3.tar.bz2 rneovim-474d0bcbf724c7eed740f60391a0ed35d651e1d3.zip |
lua: vim.rpcrequest, vim.rpcnotify, vim.NIL
Diffstat (limited to 'runtime/doc/if_lua.txt')
-rw-r--r-- | runtime/doc/if_lua.txt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/runtime/doc/if_lua.txt b/runtime/doc/if_lua.txt index 97d851a20f..bba43ea32c 100644 --- a/runtime/doc/if_lua.txt +++ b/runtime/doc/if_lua.txt @@ -587,6 +587,26 @@ vim.in_fast_event() *vim.in_fast_event()* for input. When this is `false` most API functions are callable (but may be subject to other restrictions such as |textlock|). +vim.NIL *vim.NIL* + Special value used to represent NIL in msgpack-rpc and |v:null| in + vimL interaction, and similar cases. Lua `nil` cannot be used as + part of a lua table representing a Dictionary or Array, as it + is equivalent to a missing value: `{"foo", nil}` is the same as + `{"foo"}` + +vim.rpcnotify({channel}, {method}[, {args}...]) *vim.rpcnotify()* + Sends {event} to {channel} via |RPC| and returns immediately. + If {channel} is 0, the event is broadcast to all channels. + + This function also works in a fast callback |lua-loop-callbacks|. + +vim.rpcrequest({channel}, {method}[, {args}...]) *vim.rpcrequest()* + Sends a request to {channel} to invoke {method} via + |RPC| and blocks until a response is received. + + Note: NIL values as part of the return value is represented as + |vim.NIL| special value + vim.stricmp({a}, {b}) *vim.stricmp()* Compares strings case-insensitively. Returns 0, 1 or -1 if strings are equal, {a} is greater than {b} or {a} is lesser than {b}, @@ -624,6 +644,9 @@ vim.fn.{func}({...}) *vim.fn* be represented directly as a Lua number. Empty lists and dictionaries both are represented by an empty table. + Note: |v:null| values as part of the return value is represented as + |vim.NIL| special value + Note: vim.fn keys are generated lazily, thus `pairs(vim.fn)` only enumerates functions that were called at least once. |