Skip to content

Commit f87a0d9

Browse files
feat: Update textmate bundle
1 parent da30bb5 commit f87a0d9

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

textmate_bundles/st/syntaxes/st.tmLanguage.json

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,15 @@
6464
},
6565
{
6666
"comment": "constant declarations (TODO no keyword yet)",
67-
"match": "(?:\\b|^)(global|let)\\s+(_*[A-Z][A-Z0-9_]*)\\b",
67+
"match": "(?:\\b|^)(global|let)(?:\\s*(\\[\\])|\\s)\\s*(_*[A-Z][A-Z0-9_]*)\\b",
6868
"captures": {
6969
"1": {
7070
"name": "storage.type.st"
7171
},
7272
"2": {
73+
"name": "storage.modifier.list.st"
74+
},
75+
"3": {
7376
"name": "constant.other.caps.st"
7477
}
7578
}
@@ -95,24 +98,36 @@
9598
]
9699
},
97100
"escapes": {
98-
"comment": "escapes: ASCII, byte, Unicode, quote, regex (TODO: better unicode?)",
101+
"comment": "escapes: control chars, hex, unicode",
99102
"name": "constant.character.escape.st",
100-
"match": "(\\\\)(?:(?:(x[0-7a-fA-F]{2})|(u(\\{)[\\da-fA-F]{4,6}(\\}))|.))",
103+
"match": "(\\\\)(?:([\\\\'\"abfnrtv0\\n])|(x[\\da-fA-F]{2})|(u[\\da-fA-F]{4})|(U[\\da-fA-F]{8})|(N(\\{)[^\\}]+(\\}))|(.))",
101104
"captures": {
102105
"1": {
103106
"name": "constant.character.escape.backslash.st"
104107
},
105108
"2": {
106-
"name": "constant.character.escape.bit.st"
109+
"name": "constant.character.escape.char.st"
107110
},
108111
"3": {
109-
"name": "constant.character.escape.unicode.st"
112+
"name": "constant.character.escape.bit.st"
110113
},
111114
"4": {
112-
"name": "constant.character.escape.unicode.punctuation.st"
115+
"name": "constant.character.escape.unicode.short.st"
113116
},
114117
"5": {
118+
"name": "constant.character.escape.unicode.long.st"
119+
},
120+
"6": {
121+
"name": "constant.character.escape.unicode.named.st"
122+
},
123+
"7": {
115124
"name": "constant.character.escape.unicode.punctuation.st"
125+
},
126+
"8": {
127+
"name": "constant.character.escape.unicode.punctuation.st"
128+
},
129+
"9": {
130+
"name": "invalid.illegal.character.escape"
116131
}
117132
}
118133
},
@@ -352,7 +367,7 @@
352367
"patterns": [
353368
{
354369
"comment": "variables (any char lowercase)",
355-
"name": "variable.other.rust",
370+
"name": "variable.other.st",
356371
"match": "(\\b|^)(?<!(?<!\\.)\\.)([a-z][A-Za-z0-9_]*|_+[a-z0-9][A-Za-z0-9_]*)(\\b|$)"
357372
}
358373
]

0 commit comments

Comments
 (0)