-
Notifications
You must be signed in to change notification settings - Fork 459
Open
Description
Installed products
- Visual Studio: Community 2022 (17.5.5)
Description
I would like to use a Node-based language server with a Visual Studio LSP client. I'm trying to use the Visual Studio and VS Code samples since this should be the easiest way to start, but it doesn't work.
Steps to recreate
- Download the VS Code extension samples
- Build the server of the lsp-sample
- Download the Visual Studio Extensibility Samples
- Change the
ActivateAsyncfunction in the LanguageServerProtocol sample to run the server
public async Task<Connection> ActivateAsync(CancellationToken token)
{
Process process = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = "node",
Arguments = "server.js --stdio",
RedirectStandardInput = true,
RedirectStandardOutput = true,
RedirectStandardError = true,
UseShellExecute = false,
CreateNoWindow = true
}
};
if (process.Start())
{
return new Connection(process.StandardOutput.BaseStream, process.StandardInput.BaseStream);
}
return null;
}
- Build the LanguageServerProtocol sample
- Run the extension, open the TestFiles folder, and open one of the files
Current behavior
When I open the file, I get the following error:
ConnectionLostException: The JSON-RPC connection with the remote party was lost before the request could complete.
If I set the CreateNoWindow to false I can see opening the terminal, but it closes immediately.
Expected behavior
When I press ctrl+space in the file, I should see the code completion items from the server.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels