public async loadHints(
editor: vscode.TextEditor | undefined
): Promise<void> {
- if (this.displayHints && editor !== undefined && this.isRustDocument(editor.document)) {
+ if (
+ this.displayHints &&
+ editor !== undefined &&
+ this.isRustDocument(editor.document)
+ ) {
await this.updateDecorationsFromServer(
editor.document.uri.toString(),
editor
if (Server.config.displayInlayHints) {
const hintsUpdater = new HintsUpdater();
hintsUpdater.loadHints(vscode.window.activeTextEditor).then(() => {
- disposeOnDeactivation(vscode.window.onDidChangeActiveTextEditor(editor =>
- hintsUpdater.loadHints(editor)
- ));
- disposeOnDeactivation(vscode.workspace.onDidChangeTextDocument(e =>
- hintsUpdater.updateHints(e)
- ));
- disposeOnDeactivation(vscode.workspace.onDidChangeConfiguration(_ =>
- hintsUpdater.toggleHintsDisplay(Server.config.displayInlayHints)
- ));
+ disposeOnDeactivation(
+ vscode.window.onDidChangeActiveTextEditor(editor =>
+ hintsUpdater.loadHints(editor)
+ )
+ );
+ disposeOnDeactivation(
+ vscode.workspace.onDidChangeTextDocument(e =>
+ hintsUpdater.updateHints(e)
+ )
+ );
+ disposeOnDeactivation(
+ vscode.workspace.onDidChangeConfiguration(_ =>
+ hintsUpdater.toggleHintsDisplay(
+ Server.config.displayInlayHints
+ )
+ )
+ );
});
}
}