You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to create an LSP server in C#. I have come across the LspTypes package that defines all the types of LSP 3.16. Slightly strange that there is no more up to date package for this, but that's a side note, I suppose (suggestions welcome).
Now the issue is, when I define for instance the Initialize method as InitializeResult Initialize(InitializeParams @params), I get an error saying that the client provided eight arguments while the method can only accept a single. How can I specify that the parameter denotes the entire request and the library should instead bundle all of the eight parameters into a single InitializeParams?
I tried setting UseSingleObjectParameterDeserialization = true but it does not seem to work, I still get the error message that the method only accepts a single argument but 8 were provided.
I am using StreamJsonRPC version 2.19.27.
The text was updated successfully, but these errors were encountered:
The initial problem comes of the fact that LSP isn't actually JSON-RPC. JSON-RPC would mandate that the form of requests LSP uses actually be interpreted as 8 individual parameters rather than as one object. It's a shame, because LSP could have been designed as a proper JSON-RPC use by simply adding [ ] around the JSON object it currently sets to the params property. But oh well...
Your attempt to use UseSingleObjectParameterDeserialization = true on the RPC method should have worked. We added that to StreamJsonRpc specifically to allow for the LSP variant of JSON-RPC. Are you sure your method takes exactly 1 parameter (plus an optional CancellationToken parameter)? If it takes any more than that, the attribute property will be ignored.
I am trying to create an LSP server in C#. I have come across the LspTypes package that defines all the types of LSP 3.16. Slightly strange that there is no more up to date package for this, but that's a side note, I suppose (suggestions welcome).
Now the issue is, when I define for instance the
Initialize
method asInitializeResult Initialize(InitializeParams @params)
, I get an error saying that the client provided eight arguments while the method can only accept a single. How can I specify that the parameter denotes the entire request and the library should instead bundle all of the eight parameters into a singleInitializeParams
?I tried setting
UseSingleObjectParameterDeserialization = true
but it does not seem to work, I still get the error message that the method only accepts a single argument but 8 were provided.I am using StreamJsonRPC version 2.19.27.
The text was updated successfully, but these errors were encountered: