diff options
author | Veetaha <[email protected]> | 2020-02-13 20:48:20 +0000 |
---|---|---|
committer | Veetaha <[email protected]> | 2020-02-13 20:48:20 +0000 |
commit | 7ad15c396286376c4a439b2dec4ec452b5f28dda (patch) | |
tree | d840788902ed29a561851c6e2ce02b26a14dc559 /editors/code/src/highlighting.ts | |
parent | 9b47124e6e5d32a676961c05661934215e98012c (diff) |
vscode: redesigned config with simplicity and Dart extension config implementation in mind
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 4fbbe3ddc..e2ae31d29 100644 --- a/editors/code/src/highlighting.ts +++ b/editors/code/src/highlighting.ts | |||
@@ -11,7 +11,7 @@ export function activateHighlighting(ctx: Ctx) { | |||
11 | client.onNotification( | 11 | client.onNotification( |
12 | 'rust-analyzer/publishDecorations', | 12 | 'rust-analyzer/publishDecorations', |
13 | (params: PublishDecorationsParams) => { | 13 | (params: PublishDecorationsParams) => { |
14 | if (!ctx.config.highlightingOn) return; | 14 | if (!ctx.config.highlightingOn()) return; |
15 | 15 | ||
16 | const targetEditor = vscode.window.visibleTextEditors.find( | 16 | const targetEditor = vscode.window.visibleTextEditors.find( |
17 | editor => { | 17 | editor => { |
@@ -39,7 +39,7 @@ export function activateHighlighting(ctx: Ctx) { | |||
39 | vscode.window.onDidChangeActiveTextEditor( | 39 | vscode.window.onDidChangeActiveTextEditor( |
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 | const client = ctx.client; | 43 | const client = ctx.client; |
44 | if (!client) return; | 44 | if (!client) return; |
45 | 45 | ||
@@ -122,7 +122,7 @@ class Highlighter { | |||
122 | string, | 122 | string, |
123 | [vscode.Range[], boolean] | 123 | [vscode.Range[], boolean] |
124 | > = new Map(); | 124 | > = new Map(); |
125 | const rainbowTime = this.ctx.config.rainbowHighlightingOn; | 125 | const rainbowTime = this.ctx.config.rainbowHighlightingOn(); |
126 | 126 | ||
127 | for (const tag of this.decorations.keys()) { | 127 | for (const tag of this.decorations.keys()) { |
128 | byTag.set(tag, []); | 128 | byTag.set(tag, []); |