aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/config.ts
diff options
context:
space:
mode:
authorDaniel McNab <[email protected]>2018-10-08 22:38:33 +0100
committerDaniel McNab <[email protected]>2018-10-08 22:38:33 +0100
commite26071d96e1ff56289213dbe78415f836de8a70e (patch)
tree0d6d49b2eb40ad161a72adbfbf9874b64540bf74 /editors/code/src/config.ts
parent3a405b65d61a5ad3176c223e4b7226a43fcd186e (diff)
Run prettier on all files
Diffstat (limited to 'editors/code/src/config.ts')
-rw-r--r--editors/code/src/config.ts28
1 files changed, 15 insertions, 13 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index b9ff3b810..7d05ea078 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -3,21 +3,23 @@ import * as vscode from 'vscode';
3import { Server } from './server'; 3import { Server } from './server';
4 4
5export class Config { 5export class Config {
6 public highlightingOn = true; 6 public highlightingOn = true;
7 7
8 constructor() { 8 constructor() {
9 vscode.workspace.onDidChangeConfiguration((_) => this.userConfigChanged()); 9 vscode.workspace.onDidChangeConfiguration(_ =>
10 this.userConfigChanged(); 10 this.userConfigChanged()
11 } 11 );
12 12 this.userConfigChanged();
13 public userConfigChanged() {
14 const config = vscode.workspace.getConfiguration('ra-lsp');
15 if (config.has('highlightingOn')) {
16 this.highlightingOn = config.get('highlightingOn') as boolean;
17 } 13 }
18 14
19 if (!this.highlightingOn && Server) { 15 public userConfigChanged() {
20 Server.highlighter.removeHighlights(); 16 const config = vscode.workspace.getConfiguration('ra-lsp');
17 if (config.has('highlightingOn')) {
18 this.highlightingOn = config.get('highlightingOn') as boolean;
19 }
20
21 if (!this.highlightingOn && Server) {
22 Server.highlighter.removeHighlights();
23 }
21 } 24 }
22 }
23} 25}