()
| 17 | context.subscriptions.push(client); |
| 18 | |
| 19 | const startServer = async () => { |
| 20 | registerCommands(client, context); |
| 21 | |
| 22 | // Restart the server on configuration changes that affect startup/session state. |
| 23 | const disposable = vscode.workspace.onDidChangeConfiguration( |
| 24 | async (e: vscode.ConfigurationChangeEvent) => { |
| 25 | if (!shouldRestartOnConfigurationChange(e)) { |
| 26 | return; |
| 27 | } |
| 28 | await client.stop(); |
| 29 | await client.start(); |
| 30 | }, |
| 31 | ); |
| 32 | context.subscriptions.push(disposable); |
| 33 | |
| 34 | await client.start(); |
| 35 | }; |
| 36 | |
| 37 | // If the workspace is untrusted, operate in limited mode: |
| 38 | // Do NOT start the language server or register commands. |
no test coverage detected