Skip to content

Commit

Permalink
Update LSP client to 9.0.0 (#439)
Browse files Browse the repository at this point in the history
The main driver of this update is that it improves error handling
  • Loading branch information
keyboardDrummer authored Sep 25, 2023
1 parent b42c02e commit 334d2b2
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 51 deletions.
133 changes: 88 additions & 45 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@
"got": "^11.8.2",
"promise.any": "^2.0.2",
"proxyquire": "^2.1.3",
"vscode-languageclient": "^7.0.0",
"vscode-languageclient": "^9.0.0",
"vscode-uri": "^3.0.2",
"which": "^2.0.2"
},
Expand Down
3 changes: 1 addition & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ class ExtensionRuntime {

public async startClientAndWaitForVersion() {
this.client = this.client ?? await DafnyLanguageClient.create(this.installer);
this.client.start();
await this.client.onReady();
await this.client.start();
this.languageServerVersion = await this.getLanguageServerVersionAfterStartup();
}

Expand Down
4 changes: 1 addition & 3 deletions src/language/dafnyLanguageClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,7 @@ export class DafnyLanguageClient extends LanguageClient {
private readonly diagnosticsListeners: DiagnosticListener[], forceDebug?: boolean) {
super(id, name, serverOptions, clientOptions, forceDebug);
this.diagnosticsListeners = diagnosticsListeners;
this.onReady().then(() => {
this.onNotification('dafny/textDocument/symbolStatus', params => this._onVerificationSymbolStatus.fire(params));
});
this.onNotification('dafny/textDocument/symbolStatus', params => this._onVerificationSymbolStatus.fire(params));
}

public getCounterexamples(param: ICounterexampleParams): Promise<ICounterexampleItem[]> {
Expand Down

0 comments on commit 334d2b2

Please sign in to comment.