Closed
Description
Spec: https://microsoft.github.io/language-server-protocol/specification#version_3_13_0
Currently, we use vscode-base-languageclient@4.4.0
in Theia which has the following logic to handle workspace/applyEdit
:
if (change.textDocument.version && change.textDocument.version >= 0) {
VS. the 5.1.0
version:
if (TextDocumentEdit.is(change) && change.textDocument.version && change.textDocument.version >= 0) {
The older version of the language client does not support these new documentChanges
and will result in an error on the server side:
org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request workspace/applyEdit failed with message: Cannot read property 'version' of undefined
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:209)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:193)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:192)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)