Skip to content

Commit 895a04d

Browse files
author
steveluc
committed
Add lexical coloring for 'this'.
1 parent a36f737 commit 895a04d

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Tips
104104
the cursor will be placed outside the block, so that you can
105105
continue to type 'ctrl+}' to format the next outer block.
106106
7. On Mac, the plug-in looks for the installed node executable on the
107-
default system path + in the directory '/usr/local/bin'. If your
107+
default system path and also in the directory '/usr/local/bin'. If your
108108
node installation placed the node executable elsewhere, then add
109109
the 'node\_path' setting to your Preferences.sublime-settings file.
110110
The value of the 'node\_path' setting should be the pathname of the

TypeScript.YAML-tmLanguage

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,7 @@ repository:
477477
- include: '#null-literal'
478478
- include: '#undefined-literal'
479479
- include: '#array-literal'
480+
- include: '#this-literal'
480481

481482
array-literal:
482483
name: meta.array.literal.ts
@@ -500,7 +501,11 @@ repository:
500501
null-literal:
501502
name: constant.language.null.ts
502503
match: \b(null)\b
503-
504+
505+
this-literal:
506+
name: constant.language.this.ts
507+
match: \b(this)\b
508+
504509
undefined-literal:
505510
name: constant.language.ts
506511
match: \b(undefined)\b

TypeScript.tmLanguage

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,10 @@
644644
<key>include</key>
645645
<string>#array-literal</string>
646646
</dict>
647+
<dict>
648+
<key>include</key>
649+
<string>#this-literal</string>
650+
</dict>
647651
</array>
648652
</dict>
649653
<key>logic-operator</key>
@@ -1231,6 +1235,13 @@
12311235
</dict>
12321236
</array>
12331237
</dict>
1238+
<key>this-literal</key>
1239+
<dict>
1240+
<key>match</key>
1241+
<string>\b(this)\b</string>
1242+
<key>name</key>
1243+
<string>constant.language.this.ts</string>
1244+
</dict>
12341245
<key>type</key>
12351246
<dict>
12361247
<key>name</key>

0 commit comments

Comments
 (0)