sansio-lsp-client icon indicating copy to clipboard operation
sansio-lsp-client copied to clipboard

Add support for array parameters in responses

Open pragone opened this issue 8 months ago • 4 comments
trafficstars

Adds support for array parameters in. Fixes #69

Also, in this PR, I simplify a bit the definition of some of the events. I hope you don't mind that I've done this as part of this PR, the issue is that the message_id (of JSON-RPC) was only being exposed some times, and some times it wasn't making my use of the library difficult.

All tests pass and strict checks pass too.

pragone avatar Mar 04 '25 02:03 pragone

One more thing, Roslyn uses a custom notification workspace/projectInitializationComplete that indicates that the solution file (the definition of the .Net project) has been loaded... and Roslyn expects you as a client not to send any other calls until it's done doing its initialisation, so being able to receive this event is critical. I thought of doing a bigger piece of refactoring where you could define custom events to the framework, so you could "inject" this from the outside, but considering that this was the only change needed to get Roslyn up and running I thought it was OK to just add it. Happy for feedback

pragone avatar Mar 04 '25 02:03 pragone

Supporting a roslyn-speciic thing seems fine, but it would be nice to mark Roslyn-specific things with # needed only for roslyn langserver or similar. Adding a test that actually invokes roslyn would also be nice, but feel free to do that in another PR, or not do it at all :)

@PurpleMyst Can you review this? You are probably more familiar with the code being modified.

Akuli avatar Mar 04 '25 15:03 Akuli

Added a comment as suggested. And I'm afraid I won't do the work to bring up the Roslyn Language Server... it's terribly undocumented and have it working only as a result of reverse engineering. (You'd think that Microsoft being the creators(?)/sponsors(?) of LSP would dog-food more and make it easier to run outside of Visual Studio or VSCode)

pragone avatar Mar 05 '25 03:03 pragone

@PurpleMyst ping :)

pragone avatar Mar 12 '25 00:03 pragone

Sorry for being so late! This looks very good to me; I'm more than fine with the base class inclusion, especially if it fits your use case.

PurpleMyst avatar May 04 '25 05:05 PurpleMyst