(serverId)
| 81 | } |
| 82 | |
| 83 | async function restartServer(serverId) { |
| 84 | addLspLog(serverId, "info", "Restart requested by user"); |
| 85 | toast("Restarting server..."); |
| 86 | |
| 87 | try { |
| 88 | const clientState = getClientState(serverId); |
| 89 | if (clientState) { |
| 90 | await clientState.dispose(); |
| 91 | } |
| 92 | |
| 93 | const { stopManagedServer } = await import("cm/lsp/serverLauncher"); |
| 94 | stopManagedServer(serverId); |
| 95 | |
| 96 | window.editorManager?.restartLsp?.(); |
| 97 | |
| 98 | addLspLog(serverId, "info", "Server restarted successfully"); |
| 99 | toast("Server restarted"); |
| 100 | } catch (err) { |
| 101 | addLspLog(serverId, "error", `Restart failed: ${err.message}`); |
| 102 | toast("Restart failed"); |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | async function stopServer(serverId) { |
| 107 | addLspLog(serverId, "info", "Stop requested by user"); |
nothing calls this directly
no test coverage detected