aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp.lua
diff options
context:
space:
mode:
authorKarim Abou Zeid <karim23697@gmail.com>2021-05-02 16:24:58 +0200
committerKarim Abou Zeid <karim23697@gmail.com>2021-05-02 16:24:58 +0200
commitd923f38882d8c6f6966552073147cf35a85fe369 (patch)
treed5747cf5ccc7263ae8c175d8dbc7b852b52321fa /runtime/lua/vim/lsp.lua
parentf0f3fddcddf9c01f89a8afaa32bced52632373ee (diff)
downloadrneovim-d923f38882d8c6f6966552073147cf35a85fe369.tar.gz
rneovim-d923f38882d8c6f6966552073147cf35a85fe369.tar.bz2
rneovim-d923f38882d8c6f6966552073147cf35a85fe369.zip
Add client.request_sync doc
Diffstat (limited to 'runtime/lua/vim/lsp.lua')
-rw-r--r--runtime/lua/vim/lsp.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua
index 96b404aa51..9091d310dc 100644
--- a/runtime/lua/vim/lsp.lua
+++ b/runtime/lua/vim/lsp.lua
@@ -483,6 +483,13 @@ end
--- result. You can use this with `client.cancel_request(request_id)`
--- to cancel the request.
---
+--- - request_sync(method, params, timeout_ms, bufnr)
+--- Sends a request to the server and synchronously waits for the response.
+--- This is a wrapper around {client.request}
+--- Returns: { err=err, result=result }, a dictionary, where `err` and `result` come from
+--- the |lsp-handler|. On timeout, cancel or error, returns `(nil, err)` where `err` is a
+--- string describing the failure reason. If the request was unsuccessful returns `nil`.
+---
--- - notify(method, params)
--- Sends a notification to an LSP server.
--- Returns: a boolean to indicate if the notification was successful. If