Multiple ServerOptions are supported when you initialize a LanguageClient
according to the signature of ServerOptions
.

you can use the StreamInfo
if you want to use a real remove server as your language server. Here is a sample code to connect to your server via WebSocket
and initialize a LanguageClient
.
const connection = connectToServer(hostname, path);
const client = new LanguageClient(
"docfxLanguageServer",
"Docfx Language Server",
() => Promise.resolve<StreamInfo>({
reader: connection,
writer: connection,
}),
{});
private connectToServer(hostname: string, path: string): Duplex {
const ws = new WebSocket(`ws://${hostname}/${path}`);
return WebSocket.createWebSocketStream(ws);
}