How do you reuse an existing language server (LSP) in Java using LSP4J

Viewed 145

We would like to create a headless client in Java that responds to changes in different pre-existing language servers. We are aware of the instructions to start a language server, and of the need to Implement the Language Server, but we have not found guidance on how this should be done for an existing server.

We believe that the org.eclipse.lsp4j.services.LanguageServer class is responsible for marshalling data for the server, but it is not obvious how an existing server is exposed.

There is a list of implementations at the langserver.org website. Assuming I have been able to start one of these servers and have access to its stdin and stdout for client communication, how do I need to implement in lsp4j to attach it?

0 Answers
Related