-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Hi,
I tried using the language server with vscode and noticed that vscode-languageserver-node always appends the "--stdio" flag when using TransportKind.Stdio, causing the LS to crash as it is not a supported argument. When the flag exists it runs fine.
That behavior is on purpose by vscode and it seems the language server isn't following the recommendation yet by the LSP specification.
I know there's no vscode integration yet, but I think it wouldn't hurt to have the possibility and follow the recommendation.
See:
- LanguageClient adds an extra
--stdioargument when usingTransportKind.stdiomicrosoft/vscode-languageserver-node#1440 - https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#implementationConsiderations
("it is highly recommended that a server implementation supports the following command line arguments to pick the communication channel").
It can be worked around but I think since there might be multiple transports anyway at some point, we could implement it.
I see following possibilities:
a) We provide only the --stdio Flag and default it to TRUE.
b) We provide all flags for all transports (--pipe, --socket) and respond with some unimplemented error message for those who are not stdio.
c) We provide all flags and implement all transports.
I think providing a --stdio flag and defaulting to TRUE should be the easiest fix for now to be compliant.
I'd be up to provide a PR for either a) or b).