diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2018-12-03 13:00:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-03 13:00:41 +0100 |
commit | 231de72539829e6e3b318248c35015aa20c66f31 (patch) | |
tree | 72de67ecda2504f44f5183daaddb60809e855415 /runtime/doc/api.txt | |
parent | 07ad5d71ab97a84dc9c59b3507bf7898040d24cf (diff) | |
parent | 8b42249cddf6b257e2eee808a41f3d6dd5af6846 (diff) | |
download | rneovim-231de72539829e6e3b318248c35015aa20c66f31.tar.gz rneovim-231de72539829e6e3b318248c35015aa20c66f31.tar.bz2 rneovim-231de72539829e6e3b318248c35015aa20c66f31.zip |
Merge pull request #9300 from bfredl/asyncerr
rpc: fix invalid responses, turn errors from async calls into notifications
Diffstat (limited to 'runtime/doc/api.txt')
-rw-r--r-- | runtime/doc/api.txt | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 66fb5bda82..0219488088 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -80,6 +80,19 @@ As Nvim evolves the API may change in compliance with this CONTRACT: - Deprecated functions will not be removed until Nvim version 2.0 ============================================================================== +Global events *api-global-events* + +When a client invokes an API request as an async notification, it is not +possible for Nvim to send an error response. Instead, in case of error, the +following notification will be sent to the client: + + *nvim_error_event* +nvim_error_event[{type}, {message}] + +{type} is a numeric id as defined by `api_info().error_types`, and {message} is +a string with the error message. + +============================================================================== Buffer update events *api-buffer-updates* API clients can "attach" to Nvim buffers to subscribe to buffer update events. @@ -206,7 +219,7 @@ Example using the Nvim python-client: buf.clear_highlight(src) < If the highlights don't need to be deleted or updated, just pass -1 as -src_id (this is the default in python). Use |nvim_buf_clear_highlight()| to +src_id (this is the default in python). Use |nvim_buf_clear_namespace()| to clear highlights from a specific source, in a specific line range or the entire buffer by passing in the line range 0, -1 (the latter is the default in python as used above). @@ -218,7 +231,7 @@ An example of calling the api from vimscript: > call nvim_buf_add_highlight(0, src, "Identifier", 0, 5, -1) " later - call nvim_buf_clear_highlight(0, src, 0, -1) + call nvim_buf_clear_namespace(0, src, 0, -1) > ============================================================================== Global Functions *api-global* |