diff options
Diffstat (limited to 'code')
-rw-r--r-- | code/src/extension.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/code/src/extension.ts b/code/src/extension.ts index 554ac8af3..81153b7e6 100644 --- a/code/src/extension.ts +++ b/code/src/extension.ts | |||
@@ -134,6 +134,14 @@ export function activate(context: vscode.ExtensionContext) { | |||
134 | textDocumentContentProvider.eventEmitter.fire(uris.syntaxTree) | 134 | textDocumentContentProvider.eventEmitter.fire(uris.syntaxTree) |
135 | }) | 135 | }) |
136 | }, null, context.subscriptions) | 136 | }, null, context.subscriptions) |
137 | vscode.window.onDidChangeActiveTextEditor(async (editor) => { | ||
138 | if (!editor || editor.document.languageId != 'rust') return | ||
139 | let params: lc.TextDocumentIdentifier = { | ||
140 | uri: editor.document.uri.toString() | ||
141 | } | ||
142 | let decorations = await client.sendRequest<Decoration[]>("m/decorationsRequest", params) | ||
143 | setHighlights(editor, decorations) | ||
144 | }) | ||
137 | } | 145 | } |
138 | 146 | ||
139 | // We need to order this after LS updates, but there's no API for that. | 147 | // We need to order this after LS updates, but there's no API for that. |