aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/highlighting.ts
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src/highlighting.ts')
-rw-r--r--editors/code/src/highlighting.ts11
1 files changed, 7 insertions, 4 deletions
diff --git a/editors/code/src/highlighting.ts b/editors/code/src/highlighting.ts
index 4b961170b..bc19fae2f 100644
--- a/editors/code/src/highlighting.ts
+++ b/editors/code/src/highlighting.ts
@@ -2,7 +2,7 @@ import seedrandom = require('seedrandom');
2import * as vscode from 'vscode'; 2import * as vscode from 'vscode';
3import * as lc from 'vscode-languageclient'; 3import * as lc from 'vscode-languageclient';
4import * as scopes from './scopes' 4import * as scopes from './scopes'
5 5import * as scopesMapper from './scopes_mapper';
6 6
7import { Server } from './server'; 7import { Server } from './server';
8 8
@@ -65,10 +65,13 @@ export class Highlighter {
65 tag: string, 65 tag: string,
66 textDecoration?: string 66 textDecoration?: string
67 ): [string, vscode.TextEditorDecorationType] => { 67 ): [string, vscode.TextEditorDecorationType] => {
68 const scope = scopes.find(tag)
69 68
70 if (scope) { 69 const foundRule = scopesMapper.toRule(tag, scopes.find) || scopes.find(tag)
71 const decor = createDecorationFromTextmate(scope); 70
71
72
73 if (foundRule) {
74 const decor = createDecorationFromTextmate(foundRule);
72 return [tag, decor]; 75 return [tag, decor];
73 } 76 }
74 else { 77 else {