diff options
Diffstat (limited to 'editors/code/src/extension.ts')
-rw-r--r-- | editors/code/src/extension.ts | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/editors/code/src/extension.ts b/editors/code/src/extension.ts index 9bee75394..c6efc2e7e 100644 --- a/editors/code/src/extension.ts +++ b/editors/code/src/extension.ts | |||
@@ -152,15 +152,23 @@ export function activate(context: vscode.ExtensionContext) { | |||
152 | if (Server.config.displayInlayHints) { | 152 | if (Server.config.displayInlayHints) { |
153 | const hintsUpdater = new HintsUpdater(); | 153 | const hintsUpdater = new HintsUpdater(); |
154 | hintsUpdater.loadHints(vscode.window.activeTextEditor).then(() => { | 154 | hintsUpdater.loadHints(vscode.window.activeTextEditor).then(() => { |
155 | disposeOnDeactivation(vscode.window.onDidChangeActiveTextEditor(editor => | 155 | disposeOnDeactivation( |
156 | hintsUpdater.loadHints(editor) | 156 | vscode.window.onDidChangeActiveTextEditor(editor => |
157 | )); | 157 | hintsUpdater.loadHints(editor) |
158 | disposeOnDeactivation(vscode.workspace.onDidChangeTextDocument(e => | 158 | ) |
159 | hintsUpdater.updateHints(e) | 159 | ); |
160 | )); | 160 | disposeOnDeactivation( |
161 | disposeOnDeactivation(vscode.workspace.onDidChangeConfiguration(_ => | 161 | vscode.workspace.onDidChangeTextDocument(e => |
162 | hintsUpdater.toggleHintsDisplay(Server.config.displayInlayHints) | 162 | hintsUpdater.updateHints(e) |
163 | )); | 163 | ) |
164 | ); | ||
165 | disposeOnDeactivation( | ||
166 | vscode.workspace.onDidChangeConfiguration(_ => | ||
167 | hintsUpdater.toggleHintsDisplay( | ||
168 | Server.config.displayInlayHints | ||
169 | ) | ||
170 | ) | ||
171 | ); | ||
164 | }); | 172 | }); |
165 | } | 173 | } |
166 | } | 174 | } |