_WindowMiddleware.showDocument request from server to client is missing a "token" parameter. Here is the definition. Observe that the "next" parameter is a function which takes (params: ShowDocumentParams, token: CancellationToken). However, showDocument itself doesn't take a token parameter. Therefore we have nothing to pass when we invoke next(param, ???needToken??).
By comparison, let's look at ConfigurationMiddleware.configuration request from server to client, where the signature of configuration does correctly take a token and is therefore able to pass it to the next function.
I also think the return type of showDocument is wrong. It should allow the possibility to return error, since the next function is able to return error.
_WindowMiddleware.showDocument request from server to client is missing a "token" parameter. Here is the definition. Observe that the "next" parameter is a function which takes
(params: ShowDocumentParams, token: CancellationToken)
. However,showDocument
itself doesn't take a token parameter. Therefore we have nothing to pass when we invokenext(param, ???needToken??)
.https://github.com/microsoft/vscode-languageserver-node/blob/bafd2877a4bd57f187f0d039c2c71539a303f4d5/client/src/common/client.ts#L294-L296
https://github.com/microsoft/vscode-languageserver-node/blob/bafd2877a4bd57f187f0d039c2c71539a303f4d5/protocol/src/common/protocol.showDocument.ts#L78-L84
https://github.com/microsoft/vscode-languageserver-node/blob/bafd2877a4bd57f187f0d039c2c71539a303f4d5/jsonrpc/src/common/connection.ts#L89-L91
By comparison, let's look at ConfigurationMiddleware.configuration request from server to client, where the signature of
configuration
does correctly take atoken
and is therefore able to pass it to thenext
function.https://github.com/microsoft/vscode-languageserver-node/blob/bafd2877a4bd57f187f0d039c2c71539a303f4d5/client/src/common/configuration.ts#L17-L19
https://github.com/microsoft/vscode-languageserver-node/blob/bafd2877a4bd57f187f0d039c2c71539a303f4d5/protocol/src/common/protocol.configuration.ts#L22-L28