-
Notifications
You must be signed in to change notification settings - Fork 133
Implement auto indentation when pressing the :
or Enter
keys
#671
Comments
Omni is not using LSP. They have regular TS extension which then runs their process manually and communicates with it via custom protocol. This is not technically a language server at all. Omni was implemented way before LSP was born. When actual LS/LSP runs the extension TS/editor part is bypassed and requests go directly to the LS process. Therefore what you are asking is a way to get to LS while actually VS Code did not launch it. This can be done at the extension side - start the process and perform similar connection hookup as VS Code performs internally in regular LS scenarios. Then send and receive requests either via LSP or via custom messages. This is basically a hybrid solution. There may be other cases such as get syntax errors from the parser without actually switching to LS. |
Agreed. I just see it as a separate process that ts extension communicates over some protocol.
Yes, but we can still send custom requests via the language client, and that's the plan. No changes.
No, we'll let VSC launch the language server as done today. No changes there.
Not really, we'll only do this for language server, and not when using Jedi. |
Do you still get requests for the editor functionality when LS is running? |
Not sure what you mean. But we have the ability to manually send requests to the LS, and we do this today. |
I mean that when LS is up you don't get requests for completion, tooltips, etc in the TS part, they bypass the extension and go straight to LS. I.e. TS 'completion provider' is mute. Do you still get requests for the indentation? |
Got it. No that doesn't work. |
}
.:
.I.e. if C# extension (using the .NET code, async communication via a protocol) can do this, then how about we do the same thing (using LSP over custom request).
https://github.com/OmniSharp/omnisharp-vscode/blob/f0a0336ced8cb44f78bdee88120bfe9d62a596c0/src/features/formattingEditProvider.ts#L44
export async function formatAfterKeystroke(server: OmniSharpServer, request: protocol.FormatAfterKeystrokeRequest, token: vscode.CancellationToken) {
https://github.com/OmniSharp/omnisharp-vscode/blob/f0a0336ced8cb44f78bdee88120bfe9d62a596c0/src/omnisharp/utils.ts#L42
Related to microsoft/vscode-python#481
The text was updated successfully, but these errors were encountered: