tliron / glsp

Language Server Protocol SDK for Go
Apache License 2.0
165 stars 22 forks source link

Is it possible to define custom handler? #23

Closed emil14 closed 3 months ago

emil14 commented 10 months ago

Fix me if I'm wrong but on a client I can do client.sendRequest("foobar", {}) which mean it should be possible to defined custom handler. But looking at Handler interface implementation in the lib it looks like there's a switch that simply do return in case there is no match with predefined paths. Or Am I wrong?

semanticart commented 7 months ago

I'm also curious about this. Non-standard methods not super uncommon (the ruby-lsp recently added a method for getting dependencies, for instance).

tliron commented 7 months ago

Hm, it's honestly something I did not know. I can think of a potential design for this, but very happy to review a PR to add this!

tris203 commented 3 months ago

I am working on an implementation where I would also like this. I would be happy to work on a PR. Do you have a breif overview of the design you were thinking of for this @tliron just to make sure we are aligned?

tliron commented 3 months ago

How about we turn this issue into a discussion and share design ideas?

tris203 commented 3 months ago

How about we turn this issue into a discussion and share design ideas?

Sure