diff options
Diffstat (limited to 'editors/code/src/highlighting.ts')
-rw-r--r-- | editors/code/src/highlighting.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editors/code/src/highlighting.ts b/editors/code/src/highlighting.ts index fc7cd5a1c..3d190c3ad 100644 --- a/editors/code/src/highlighting.ts +++ b/editors/code/src/highlighting.ts | |||
@@ -40,7 +40,7 @@ export function activateHighlighting(ctx: Ctx) { | |||
40 | async (editor: vscode.TextEditor | undefined) => { | 40 | async (editor: vscode.TextEditor | undefined) => { |
41 | if (!editor || editor.document.languageId !== 'rust') return; | 41 | if (!editor || editor.document.languageId !== 'rust') return; |
42 | if (!ctx.config.highlightingOn) return; | 42 | if (!ctx.config.highlightingOn) return; |
43 | let client = ctx.client; | 43 | const client = ctx.client; |
44 | if (!client) return; | 44 | if (!client) return; |
45 | 45 | ||
46 | const params: lc.TextDocumentIdentifier = { | 46 | const params: lc.TextDocumentIdentifier = { |
@@ -106,7 +106,7 @@ class Highlighter { | |||
106 | } | 106 | } |
107 | 107 | ||
108 | public setHighlights(editor: vscode.TextEditor, highlights: Decoration[]) { | 108 | public setHighlights(editor: vscode.TextEditor, highlights: Decoration[]) { |
109 | let client = this.ctx.client; | 109 | const client = this.ctx.client; |
110 | if (!client) return; | 110 | if (!client) return; |
111 | // Initialize decorations if necessary | 111 | // Initialize decorations if necessary |
112 | // | 112 | // |
@@ -175,7 +175,7 @@ function initDecorations(): Map<string, vscode.TextEditorDecorationType> { | |||
175 | const res = new Map(); | 175 | const res = new Map(); |
176 | TAG_TO_SCOPES.forEach((scopes, tag) => { | 176 | TAG_TO_SCOPES.forEach((scopes, tag) => { |
177 | if (!scopes) throw `unmapped tag: ${tag}`; | 177 | if (!scopes) throw `unmapped tag: ${tag}`; |
178 | let rule = theme.lookup(scopes); | 178 | const rule = theme.lookup(scopes); |
179 | const decor = createDecorationFromTextmate(rule); | 179 | const decor = createDecorationFromTextmate(rule); |
180 | res.set(tag, decor); | 180 | res.set(tag, decor); |
181 | }); | 181 | }); |