aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/extension.ts
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2019-07-23 14:38:21 +0100
committerKirill Bulatov <[email protected]>2019-07-25 13:17:28 +0100
commit169e69d217600062f6299f7f9521f3f2776d0333 (patch)
treec7cb0782a1525a7b1355eac2dde80fc82492e59f /editors/code/src/extension.ts
parent1d68e6171e68b9c95aec7a2e53cbf03ae8a672fe (diff)
Show type decorators
Diffstat (limited to 'editors/code/src/extension.ts')
-rw-r--r--editors/code/src/extension.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/editors/code/src/extension.ts b/editors/code/src/extension.ts
index c8c3004a7..a0b897385 100644
--- a/editors/code/src/extension.ts
+++ b/editors/code/src/extension.ts
@@ -3,6 +3,7 @@ import * as lc from 'vscode-languageclient';
3 3
4import * as commands from './commands'; 4import * as commands from './commands';
5import { CargoWatchProvider } from './commands/cargo_watch'; 5import { CargoWatchProvider } from './commands/cargo_watch';
6import { HintsUpdater } from './commands/inlay_hints';
6import { 7import {
7 interactivelyStartCargoWatch, 8 interactivelyStartCargoWatch,
8 startCargoWatch 9 startCargoWatch
@@ -147,6 +148,16 @@ export function activate(context: vscode.ExtensionContext) {
147 148
148 // Start the language server, finally! 149 // Start the language server, finally!
149 startServer(); 150 startServer();
151
152 if (Server.config.displayInlayHints) {
153 const hintsUpdater = new HintsUpdater();
154 hintsUpdater.loadHints(vscode.window.activeTextEditor).then(() => {
155 vscode.window.onDidChangeActiveTextEditor(editor => hintsUpdater.loadHints(editor));
156 vscode.workspace.onDidChangeTextDocument(e => hintsUpdater.updateHints(e));
157 vscode.workspace.onDidCloseTextDocument(document => hintsUpdater.dropHints(document));
158 vscode.workspace.onDidChangeConfiguration(_ => hintsUpdater.toggleHintsDisplay(Server.config.displayInlayHints));
159 });
160 }
150} 161}
151 162
152export function deactivate(): Thenable<void> { 163export function deactivate(): Thenable<void> {