diff options
Diffstat (limited to 'runtime/doc/msgpack_rpc.txt')
-rw-r--r-- | runtime/doc/msgpack_rpc.txt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/doc/msgpack_rpc.txt b/runtime/doc/msgpack_rpc.txt index 2c4b1b35bc..7fff0959d0 100644 --- a/runtime/doc/msgpack_rpc.txt +++ b/runtime/doc/msgpack_rpc.txt @@ -45,7 +45,7 @@ msgpack-rpc details from application developers. The wrappers can be automatically generated by reading bundled API metadata from a compiled Nvim instance. -There are two ways to obtain API metadata: +There are three ways to obtain API metadata: 1. Connect to a running Nvim instance and call `vim_get_api_info` via msgpack-rpc. This is best for clients written in dynamic languages which @@ -55,8 +55,10 @@ There are two ways to obtain API metadata: of msgpack metadata to standard output. This is useful for clients written in statically-compiled languages. +3. In vimscript the metadata is available as |api_info()|. + To get a human-readable list of API functions: > - :new|put =map(msgpackparse(systemlist('nvim --api-info'))[0].functions, 'v:val.name._VAL[0]') + :new|put =map(api_info().functions, 'v:val.name') < To get a formatted dump of the API using python (requires the `pyyaml` and `msgpack-python` packages): > |