I want to write a simple LSP server to provide autocomplete that will work with any number of IDEs and Editors that are LSP tools.
On the topic of startup, the LSP specification does say the following:
The current protocol specification defines that the lifecycle of a server is managed by the client (e.g. a tool like VS Code or Emacs). It is up to the client to decide when to start (process-wise) and when to shutdown a server.
source emphasis my own
However nowhere in the specification can I find how the development tool (client) actually launches the server.
The spec just continues straight into the Initialize Request which requires the client and tool already to be connected.
So 2 questions:
- If I develop a languageServer.exe that uses a RESTful API over HTTP to communicate with the LSP tool, is there some standard entrypoint where my server and client can agree on what port to use.
- If I develop a new LSP tool how can I get some LSP Server from a VSCode extension and launch and connect to it. Is this standard?