aboutsummaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-27 22:20:59 +0100
committerAleksey Kladov <[email protected]>2018-08-27 22:20:59 +0100
commit8f5330cb0796670a93089107c8b15cdef3fa7c94 (patch)
tree02ce05a2222adb4ab1fb3464da926ec0fd0fb234 /code
parent010075be6a6b866f6a3f981a61ad2e746cb44f00 (diff)
More robust highlighting
Diffstat (limited to 'code')
-rw-r--r--code/src/extension.ts8
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.