Skip to content

Commit c136c17

Browse files
committed
fix: check languageClient status after stating it
1 parent 3e483ba commit c136c17

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/languageClient.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,10 @@ export class LanguageClientManager implements LanguageClient {
152152
try {
153153
this.startPromise = this._start()
154154
await this.startPromise
155+
// If the initialize request fails, the start method still returns a resolve promise due to a vscode-languageclient bug
156+
if (!(this.languageClient?.isRunning() ?? false)) {
157+
throw new Error('Language server not running')
158+
}
155159
started = true
156160
} catch (error) {
157161
this.languageClient = undefined

0 commit comments

Comments
 (0)