microsoft/language-server-protocol

language server serves /protocol.json

nojvek opened this issue · 6 comments

It seems this protocol has similarities to the Chrome Remote Debugging protocol.

Does it make sense for the repo to have a protocol.json file ? e.g https://cs.chromium.org/chromium/src/third_party/WebKit/Source/platform/v8_inspector/js_protocol.json

This means different language servers implement the protocol and maintain a protocol.json file which can be queried if the API is compatible and has any breaking changes.

The protocol.json can then be used to automatically generate code for a client or server implementation in languages other than typescript.

e.g I can consume protocol.json and automatically generate a Java class for java language service interface.

Same for PHP, python and the rest. Code generation on both client and server can benefit.

+1 excellent idea! Eclipse JSDT uses protocol.json to generate the Java model.

Yes that makes sense to me. We could then even generate the protocol.ts from it.

I think I can help with this since I am creating a similar model for the java bindings. What should be the meta model though. Use the model from V8s protocol.json or alternately use json schema specification?

I've made some progress on the last few days defining protocol.d.ts
interface for chrome's protocol.json files. Thanks to typescript I already
found a few nitty gritty bugs in their json files.

Hope it can be used as a template.

https://github.com/nojvek/chrome-remote-debug-interface/tree/master/generator

On Fri, Jul 1, 2016 at 8:03 AM, Gorkem Ercan notifications@github.com
wrote:

I think I can help with this since I am creating a similar think for the
java binding. What should be the meta model though. Use the model from V8s
protocol.json or alternately use json schema specification?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#25 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AA-JVFTbRz0__cStx-9rvVKqmGvkizRMks5qRSwqgaJpZM4JAZUD
.

I created a PR with the protocol.json that I have used to generate the java-language-server APIs. The files is a json schema and it is mostly generated from protocol.d.ts file. I think it still needs a bit of work to sync the changes on .md file etc

I will close this issue in favor of #67