Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [lsp4e-dev] What is the long-term communication strategy between lsp4e <-> language server?

Hi,

On 01/19/2017 09:22 AM, Nick Chen wrote:
I see in http://git.eclipse.org/c/lsp4e/lsp4e.git/tree/org.eclipse.lsp4e.languages/src/org/eclipse/lsp4e/languages/CSSLanguageServer.java#n24 that we are using the —stdio option. Is that going to be the main way for communication in the long-term? Or will lsp4e start supporting sockets and pipes?
I noticed the the java-language-server doesn’t offer a stdio option and, instead, uses sockets. See https://github.com/gorkem/java-language-server/blob/master/org.jboss.tools.vscode.java/src/org/jboss/tools/vscode/java/internal/ConnectionStreamFactory.java
I am asking because we are writing a language server for a language we have and want to know what kinds of communications we need to support to get it to integrate nicely with lsp4 in the future.
See the plugin.xml of org.eclipse.lsp4e.languages for examples of how to define a language server. It uses the org.eclipse.lsp4e.languageServer extension point which relies on a StreamConnectionProvider class to define the communication strategy. The stream can be whatever stream, stdin/stdio or websockets.

HTH
--
Mickael Istria
Eclipse developer for Red Hat Developers
My blog - My Tweets

Back to the top