summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorYegappan Lakshmanan <yegappan@yahoo.com>2022-04-18 14:07:46 +0100
committerBram Moolenaar <Bram@vim.org>2022-04-18 14:07:46 +0100
commit03cca297df5210f94be2246cfdb1ee9a30454bea (patch)
treecc2f525d9f41ad11e2d0520c0c7b0d8d557455f8 /runtime
parent53e8f3ffdf80dbd24a60adb51f8f21982fd41c57 (diff)
patch 8.2.4780: parsing an LSP message fails when it is splitv8.2.4780
Problem: Parsing an LSP message fails when it is split. Solution: Collapse the received data before parsing. (Yegappan Lakshmanan, closes #10215)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/channel.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/doc/channel.txt b/runtime/doc/channel.txt
index ae90430509..43862d8a2a 100644
--- a/runtime/doc/channel.txt
+++ b/runtime/doc/channel.txt
@@ -1433,11 +1433,17 @@ To open a channel using the 'lsp' mode with a job, set the 'in_mode' and
let opts = {}
let opts.in_mode = 'lsp'
let opts.out_mode = 'lsp'
+ let opts.err_mode = 'nl'
let opts.out_cb = function('LspOutCallback')
let opts.err_cb = function('LspErrCallback')
let opts.exit_cb = function('LspExitCallback')
let job = job_start(cmd, opts)
+Note that if a job outputs LSP messages on stdout and non-LSP messages on
+stderr, then the channel-callback function should handle both the message
+formats appropriately or you should use a separate callback function for
+"out_cb" and "err_cb" to handle them as shown above.
+
To synchronously send a JSON-RPC request to the server, use the
|ch_evalexpr()| function. This function will wait and return the decoded
response message from the server. You can use either the |channel-timeout| or