diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-11-27 20:45:41 +0100 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2020-01-01 19:26:29 +0100 |
commit | ea4127e9a7a624484f51c21e17f37c766da15da0 (patch) | |
tree | bcac8ad881805acd86a1d62d87741c5007f31d91 /runtime/doc/lua.txt | |
parent | a251b588acb3a561e5da695280774b9b6fbcd0ea (diff) | |
download | rneovim-ea4127e9a7a624484f51c21e17f37c766da15da0.tar.gz rneovim-ea4127e9a7a624484f51c21e17f37c766da15da0.tar.bz2 rneovim-ea4127e9a7a624484f51c21e17f37c766da15da0.zip |
lua: metatable for empty dict value
Diffstat (limited to 'runtime/doc/lua.txt')
-rw-r--r-- | runtime/doc/lua.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 9601537c8d..d1f244c76f 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -717,6 +717,16 @@ vim.NIL *vim.NIL* is equivalent to a missing value: `{"foo", nil}` is the same as `{"foo"}` +vim.empty_dict() *vim.empty_dict()* + Creates a special table which will be converted to an empty + dictionary when converting lua values to vimL or API types. The + table is empty, and this property is marked using a metatable. An + empty table `{}` without this metatable will default to convert to + an array/list. + + Note: if numeric keys are added to the table, the metatable will be + ignored and the dict converted to a list/array anyway. + 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. |