-
-
Notifications
You must be signed in to change notification settings - Fork 84
/
TextMate Syntax Definition (YAML).YAML-tmLanguage
497 lines (446 loc) · 21.1 KB
/
TextMate Syntax Definition (YAML).YAML-tmLanguage
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
# [PackageDev] target_format: plist, ext: tmLanguage
---
name: TextMate Syntax Definition (YAML)
fileTypes: [YAML-tmLanguage]
scopeName: source.yaml-tmlanguage
uuid: 112dad9d-558e-4ab2-a4cc-c5f1ffa80ee6
patterns:
## first, match the global stuff
- name: entity.other.document-start.yaml-tmlanguage
match: ^---(?= |$)
- name: entity.other.document-end.yaml-tmlanguage
match: ^\.{3}$
- name: invalid.illegal.tab-indent.yaml-tmlanguage
match: ^\t+
- include: '#comment'
## second, match content
# in-repo
- include: '#repository'
# main scope
- include: '#uuid'
- include: '#name-main'
- include: '#scope-name'
- include: '#file-types'
- include: '#author'
- include: '#key-equivalent'
- include: '#other-markers'
# child scope
- include: '#patterns'
- include: '#captures'
- include: '#name'
- include: '#match'
- include: '#include'
- include: '#comment-from-key'
- include: '#number-key'
# the other remaining keys
- include: '#repository-key-inline'
# match for comments again after consuming the other sequences
- include: '#comment'
# unmatched but (probably) valid stuff
- include: '#unmatched'
# everything else should remain unmatched
# - include: '#illegal'
#######################################
repository:
# control sequences
comment:
match: (?:^ *|\G *| +)((#).*\n?)
captures:
'1': {name: comment.line.number-sign.yaml-tmlanguage}
'2': {name: punctuation.definition.comment.line.yaml-tmlanguage}
# special keys (main scope)
uuid:
name: meta.uuid.yaml-tmlanguage
match: (?:,|\{ *|^)((["']?)(uuid|bundleUUID)(\2))(:) +((["']?)(\h{8}-\h{4}-\h{4}-\h{4}-\h{12})(\7))
captures:
'1': {name: string.other.quoted-or-unquoted.yaml-tmlanguage}
'2': {name: punctuation.definition.string.yaml-tmlanguage}
'3': {name: keyword.other.uuid.yaml-tmlanguage}
'4': {name: punctuation.definition.string.yaml-tmlanguage}
'5': {name: keyword.control.definition.yaml-tmlanguage}
#'6': {name: string.other.quoted-or-unquoted.yaml-tmlanguage} # "string constant" is assigned by certain color schemes
'7': {name: punctuation.definition.string.yaml-tmlanguage}
'8': {name: constant.numeric.uuid.yaml-tmlanguage}
'9': {name: punctuation.definition.string.yaml-tmlanguage}
name-main:
# This one is allowed to contain nearly all characters instead of
# the scope defining 'name' (not recognized in flow style, i.e. after ",")
# Note: Please refuse to use " or ' in your syntax name, it makes things complicated
name: meta.name-main.yaml-tmlanguage
match: ^((["']?)(name)(\2))(:) +((["']?).*?(\7))(?=, |,$| +#| *$| *})
captures:
'1': {name: string.other.quoted-or-unquoted.yaml-tmlanguage}
'2': {name: punctuation.definition.string.yaml-tmlanguage}
'3': {name: keyword.other.name.yaml-tmlanguage}
'4': {name: punctuation.definition.string.yaml-tmlanguage}
'5': {name: keyword.control.definition.yaml-tmlanguage}
'6': {name: entity.other.name.yaml-tmlanguage}
'7': {name: punctuation.definition.string.yaml-tmlanguage}
'8': {name: punctuation.definition.string.yaml-tmlanguage}
scope-name:
name: meta.scope-name.yaml-tmlanguage
match: (?:,|\{ *|^)((["']?)(scopeName)(\2))(:) +((["']?)[-\w\. ]*(\7))
captures:
'1': {name: string.other.quoted-or-unquoted.yaml-tmlanguage}
'2': {name: punctuation.definition.string.yaml-tmlanguage}
'3': {name: keyword.other.name.yaml-tmlanguage}
'4': {name: punctuation.definition.string.yaml-tmlanguage}
'5': {name: keyword.control.definition.yaml-tmlanguage}
'6': {name: meta.value.yaml-tmlanguage string.other.quoted-or-unquoted.yaml-tmlanguage}
'7': {name: punctuation.definition.string.yaml-tmlanguage}
'8': {name: punctuation.definition.string.yaml-tmlanguage}
file-types:
patterns:
# single-line
- name: meta.file-types.yaml-tmlanguage
begin: (?:, +|\{ *|^)((["']?)(fileTypes)(\2))(:) (\[)
beginCaptures:
'1': {name: string.other.quoted-or-unquoted.yaml-tmlanguage}
'2': {name: punctuation.definition.string.yaml-tmlanguage}
'3': {name: keyword.other.name.yaml-tmlanguage}
'4': {name: punctuation.definition.string.yaml-tmlanguage}
'5': {name: keyword.control.definition.yaml-tmlanguage}
'6': {name: keyword.control.list.opening-bracket.yaml-tmlanguage}
end: \]
endCaptures:
'0': {name: keyword.control.list.closing-bracket.yaml-tmlanguage}
patterns:
# items (in array)
- match: (?:\G|^),? *((["']?)([-\w\._]+)(\2))(?=, |,$| +#| *\Z| *\])
captures:
'1': {name: string.other.quoted-or-unquoted.yaml-tmlanguage}
'2': {name: punctuation.definition.string.yaml-tmlanguage}
'3': {name: support.other.file-types.item.yaml-tmlanguage}
'4': {name: punctuation.definition.string.yaml-tmlanguage}
- include: '#comment'
# multi-line
- name: meta.file-types.yaml-tmlanguage
begin: (?:, +|\{ *|^)((["']?)(fileTypes)(\2))(:)(?= +#| *$)
beginCaptures:
'1': {name: string.other.quoted-or-unquoted.yaml-tmlanguage}
'2': {name: punctuation.definition.string.yaml-tmlanguage}
'3': {name: keyword.other.name.yaml-tmlanguage}
'4': {name: punctuation.definition.string.yaml-tmlanguage}
'5': {name: keyword.control.definition.yaml-tmlanguage}
end: ^(?!$|-| *#)
patterns:
# multi-line items
- match: ^- +((["']?)([-\w\. _]+)(\2))(?= +#| *$)
captures:
'1': {name: string.other.quoted-or-unquoted.yaml-tmlanguage}
'2': {name: punctuation.definition.string.yaml-tmlanguage}
'3': {name: support.other.file-types.item.yaml-tmlanguage}
'4': {name: punctuation.definition.string.yaml-tmlanguage}
- include: '#comment'
repository:
patterns:
# inline (who'd even use this?)
# Note: probably broken with line breaks AFTER { or ,
- name: meta.repository.yaml-tmlanguage
match: (?:, +|\{ *)((["']?)(repository)(\2))(:)
captures:
'1': {name: string.other.quoted-or-unquoted.yaml-tmlanguage}
'2': {name: punctuation.definition.string.yaml-tmlanguage}
'3': {name: entity.other.repository.yaml-tmlanguage}
'4': {name: punctuation.definition.string.yaml-tmlanguage}
'5': {name: keyword.control.definition.yaml-tmlanguage}
# multi-line (this is what you want)
- name: meta.repository-block.yaml-tmlanguage
begin: ^((["']?)(repository)(\2))(:)
beginCaptures:
'1': {name: string.other.quoted-or-unquoted.yaml-tmlanguage}
'2': {name: punctuation.definition.string.yaml-tmlanguage}
'3': {name: entity.other.repository.yaml-tmlanguage}
'4': {name: punctuation.definition.string.yaml-tmlanguage}
'5': {name: keyword.control.definition.yaml-tmlanguage}
end: ^(?!\s*($|#))(?=\S)
patterns:
- include: '#comment'
- include: '#repository-key'
# child scope
- include: '#patterns'
- include: '#captures'
- include: '#name'
- include: '#match'
- include: '#include'
- include: '#comment-from-key'
- include: '#number-key'
- include: '#comment'
- include: '#unmatched'
- include: '#illegal'
# in-block special keys
name:
name: meta.name.yaml-tmlanguage
match: (?:, +|\{ *|^ {2,}|^ *- +)((["']?)(contentName|name)(\2))(:) +((["']?)[-\w\. ]*(\7))
captures:
'1': {name: string.other.quoted-or-unquoted.yaml-tmlanguage}
'2': {name: punctuation.definition.string.yaml-tmlanguage}
'3': {name: keyword.other.name.yaml-tmlanguage}
'4': {name: punctuation.definition.string.yaml-tmlanguage}
'5': {name: keyword.control.definition.yaml-tmlanguage}
'6': {name: meta.value.yaml-tmlanguage string.other.quoted-or-unquoted.yaml-tmlanguage}
'7': {name: punctuation.definition.string.yaml-tmlanguage}
'8': {name: punctuation.definition.string.yaml-tmlanguage}
author:
name: meta.author.yaml-tmlanguage
match: (?:,|\{ *|^)((["']?)(author)(\2))(:) +((["']?).*(\7))
captures:
'1': {name: string.other.quoted-or-unquoted.yaml-tmlanguage}
'2': {name: punctuation.definition.string.yaml-tmlanguage}
'3': {name: keyword.other.name.author.yaml-tmlanguage}
'4': {name: punctuation.definition.string.yaml-tmlanguage}
'5': {name: keyword.control.definition.yaml-tmlanguage}
'6': {name: meta.value.yaml-tmlanguage string.other.quoted-or-unquoted.yaml-tmlanguage}
'7': {name: punctuation.definition.string.yaml-tmlanguage}
'8': {name: punctuation.definition.string.yaml-tmlanguage}
key-equivalent:
name: meta.key-equivalent.yaml-tmlanguage
match: (?:,|\{ *|^)((["']?)(keyEquivalent)(\2))(:) +((["']?).*(\7))
captures:
'1': {name: string.other.quoted-or-unquoted.yaml-tmlanguage}
'2': {name: punctuation.definition.string.yaml-tmlanguage}
'3': {name: keyword.other.name.key-equivalent.yaml-tmlanguage}
'4': {name: punctuation.definition.string.yaml-tmlanguage}
'5': {name: keyword.control.definition.yaml-tmlanguage}
'6': {name: meta.value.yaml-tmlanguage string.other.quoted-or-unquoted.yaml-tmlanguage}
'7': {name: punctuation.definition.string.yaml-tmlanguage}
'8': {name: punctuation.definition.string.yaml-tmlanguage}
# firstLineMatch/foldingStartMarker/foldingStopMarker
other-markers:
patterns:
# multi-line (block style)
- name: meta.other-marker.block.yaml-tmlanguage
contentName: meta.value.yaml-tmlanguage
begin: ^( *)?(?:- +)?((["']?)(firstLineMatch|foldingStartMarker|foldingStopMarker)(\3))(:) +([|>])(?=, |,$| +#| *$)
beginCaptures:
'2': {name: string.other.quoted-or-unquoted.yaml-tmlanguage}
'3': {name: punctuation.definition.string.yaml-tmlanguage}
'4': {name: keyword.other.name.other-marker.yaml-tmlanguage}
'5': {name: punctuation.definition.string.yaml-tmlanguage}
'6': {name: keyword.control.definition.yaml-tmlanguage}
'7': {name: keyword.control.block.yaml-tmlanguage}
end: ^(?! *$|\1 )
patterns:
- include: '#comment'
- include: source.oniregexp
# single-line (quoted)
- name: meta.other-marker.yaml-tmlanguage
contentName: meta.value.yaml-tmlanguage
begin: (?:, +|\{ *|^ {2,}|^ *- +)?((["']?)(firstLineMatch|foldingStartMarker|foldingStopMarker)(\2))(:) +(["'])
beginCaptures:
'1': {name: string.other.quoted-or-unquoted.yaml-tmlanguage}
'2': {name: punctuation.definition.string.yaml-tmlanguage}
'3': {name: keyword.other.name.other-marker.yaml-tmlanguage}
'4': {name: punctuation.definition.string.yaml-tmlanguage}
'5': {name: keyword.control.definition.yaml-tmlanguage}
'6': {name: punctuation.definition.string.yaml-tmlanguage}
end: \6(?!\6)
endCaptures:
'0': {name: punctuation.definition.string.yaml-tmlanguage}
patterns:
- match: "''"
name: test
- include: source.oniregexp
# single-line (unquoted)
- name: meta.other-marker.yaml-tmlanguage
contentName: meta.value.yaml-tmlanguage
begin: (?:, +|\{ *|^ {2,}|^ *- +)?((["']?)(firstLineMatch|foldingStartMarker|foldingStopMarker)(\2))(:) +(?!["'])
beginCaptures:
'1': {name: string.other.quoted-or-unquoted.yaml-tmlanguage}
'2': {name: punctuation.definition.string.yaml-tmlanguage}
'3': {name: keyword.other.name.other-marker.yaml-tmlanguage}
'4': {name: punctuation.definition.string.yaml-tmlanguage}
'5': {name: keyword.control.definition.yaml-tmlanguage}
end: (?=, |,$| +[#{\['"]| *$| *})
patterns:
- include: source.oniregexp
match:
patterns:
# multi-line (block style)
- name: meta.match.block.yaml-tmlanguage
contentName: meta.value.yaml-tmlanguage
# I don't have a single fucking clue why but apparently removing
# the empty capturing group BREAKS the regexp
begin: ^( *)(?:-?( +)())((["']?)(match|begin|end)(\3))(:) +([|>](\d*)[-+]?)(?=, |,$| +#| *$)
beginCaptures:
'4': {name: string.other.quoted-or-unquoted.yaml-tmlanguage}
'5': {name: punctuation.definition.string.yaml-tmlanguage}
'6': {name: keyword.other.match.yaml-tmlanguage}
'7': {name: punctuation.definition.string.yaml-tmlanguage}
'8': {name: keyword.control.definition.yaml-tmlanguage}
'9': {name: keyword.control.block.yaml-tmlanguage}
'10': {name: constant.numeric.indentation-indicator.yaml-tmlanguage}
# must be indented by at least as much as the key line + 1 (+ 1 for the potential '-')
end: ^(?! *$|\1\2 )
patterns:
- include: '#comment' # for comments after the "|" or ">"
- include: source.oniregexp
# single-line (quoted)
- name: meta.match.yaml-tmlanguage
contentName: meta.value.yaml-tmlanguage
begin: (?:, +|\{ *|^ {2,}|^ *- +)((["']?)(match|begin|end)(\2))(:) +(["'])
beginCaptures:
'1': {name: string.other.quoted-or-unquoted.yaml-tmlanguage}
'2': {name: punctuation.definition.string.yaml-tmlanguage}
'3': {name: keyword.other.match.yaml-tmlanguage}
'4': {name: punctuation.definition.string.yaml-tmlanguage}
'5': {name: keyword.control.definition.yaml-tmlanguage}
'6': {name: punctuation.definition.string.yaml-tmlanguage}
end: \6(?!\6)
endCaptures:
'0': {name: punctuation.definition.string.yaml-tmlanguage}
patterns:
# Consume double-escaped single quotes so they won't interfere with the "end" match
- match: "''"
- match: '""'
- include: source.oniregexp
# single-line (unquoted)
- name: meta.match.yaml-tmlanguage
contentName: meta.value.yaml-tmlanguage
begin: (?:, +|\{ *|^ {2,}|^ *- +)((["']?)(match|begin|end)(\2))(:)(?:(?= +#)| +(?!["'\[{]))
beginCaptures:
'1': {name: string.other.quoted-or-unquoted.yaml-tmlanguage}
'2': {name: punctuation.definition.string.yaml-tmlanguage}
'3': {name: keyword.other.match.yaml-tmlanguage}
'4': {name: punctuation.definition.string.yaml-tmlanguage}
'5': {name: keyword.control.definition.yaml-tmlanguage}
# This regexp is complex due to the many possibilities to terminate a string.
end: (?=, |,$| +[#{\[]| *$| *})
patterns:
- include: source.oniregexp
include:
name: meta.include.yaml-tmlanguage
match: | # example for multi-line match blocks (remember to escape " " spaces when using (?x))
(?x)
(?:,\ +|\{\ *|^\ {2,}|^\ *-\ +)
((["']?)(include)(\2))(:)\ +
((["'])(?:(\$self)
|\#?([-\w\.\ ]*)) (\7)
|(\$self)
|([-\w\.\ ]*)
)
captures:
'1': {name: string.other.quoted-or-unquoted.yaml-tmlanguage}
'2': {name: punctuation.definition.string.yaml-tmlanguage}
'3': {name: keyword.other.include.yaml-tmlanguage}
'4': {name: punctuation.definition.string.yaml-tmlanguage}
'5': {name: keyword.control.definition.yaml-tmlanguage}
'6': {name: meta.value.yaml-tmlanguage string.other.quoted-or-unquoted.yaml-tmlanguage}
'7': {name: punctuation.definition.string.yaml-tmlanguage}
'8': {name: storage.modifier.self-include.yaml-tmlanguage}
'9': {name: variable.other.include.yaml-tmlanguage}
'10': {name: punctuation.definition.string.yaml-tmlanguage}
'11': {name: storage.modifier.self-include.yaml-tmlanguage}
'12': {name: variable.other.include.yaml-tmlanguage}
comment-from-key:
patterns:
# block style
- name: meta.comment-from-key.block.yaml-tmlanguage
contentName: comment.block.from-key.block.yaml-tmlanguage
comment: | # real comment
block
comment
begin: ^( *)(?:- +)?((["']?)(comment)(\3))(:) +([|>](\d*)[-+]?)(?=, |,$| +#| *$)
beginCaptures:
'2': {name: string.other.quoted-or-unquoted.yaml-tmlanguage}
'3': {name: punctuation.definition.string.yaml-tmlanguage}
'4': {name: keyword.other.comment-from-key.yaml-tmlanguage}
'5': {name: punctuation.definition.string.yaml-tmlanguage}
'6': {name: keyword.control.definition.yaml-tmlanguage}
'7': {name: keyword.control.block.yaml-tmlanguage}
'8': {name: constant.numeric.indentation-indicator.yaml-tmlanguage}
# must be indented by at least as much as the key line + 1
end: ^(?! *$|\1 )
# quoted
# TODO: consider " and ' separately as they use different escape mechanisms actually
- name: meta.comment-from-key.quoted.yaml-tmlanguage
contentName: comment.block.from-key.quoted.yaml-tmlanguage
comment: "test comment
over multiple lines?"
begin: (?:, +|\{ *|^ *|^ *- +)((["']?)(comment)(\2))(:) +(?!#)(["'])
beginCaptures:
'1': {name: string.other.quoted-or-unquoted.yaml-tmlanguage}
'2': {name: punctuation.definition.string.yaml-tmlanguage}
'3': {name: keyword.other.comment-from-key.yaml-tmlanguage}
'4': {name: punctuation.definition.string.yaml-tmlanguage}
'5': {name: keyword.control.definition.yaml-tmlanguage}
'6': {name: punctuation.definition.string.yaml-tmlanguage}
end: (?<![^\\]\\)(\6)(?=, |,$| +#| *$| *})
endCaptures:
'1': {name: punctuation.definition.string.yaml-tmlanguage}
# unquoted
- name: meta.comment-from-key.unquoted.yaml-tmlanguage
contentName: comment.block.from-key.unquoted.yaml-tmlanguage
comment: this is a "test" comment
in another line # and this is a real comment
begin: ^( *)(?:-( +))?((["']?)(comment)(\4))(:)[ ]
beginCaptures:
'3': {name: string.other.quoted-or-unquoted.yaml-tmlanguage}
'4': {name: punctuation.definition.string.yaml-tmlanguage}
'5': {name: keyword.other.comment-from-key.yaml-tmlanguage}
'6': {name: punctuation.definition.string.yaml-tmlanguage}
'7': {name: keyword.control.definition.yaml-tmlanguage}
# Must be indented by at least as much as the key line + 1 - or terminated by :stuff:
# Note1: can not differentiate if within inline ({) or block and thus
# the inline terminating sequences which are valid in blocks are ignored completely.
# Currently only interesting for "comment: no # still no"
# Note2: Minimum indent is " " if the comment key is not the first key in a list
# (e.g. "- name: something\n comment: dd"). Easiest workaroung.
end: ^(?! *$|\1\2 ) #|(?<=.)(?=, |,$| +#| *(?<![^\\]\\)})
# dict keys
captures:
name: meta.captures.yaml-tmlanguage
match: (?:, +|\{ *|^ {2,}|^ *- +)((["']?)((?:(?:begin|end)C|c)aptures)(\2))(:)
captures:
'1': {name: string.other.quoted-or-unquoted.yaml-tmlanguage}
'2': {name: punctuation.definition.string.yaml-tmlanguage}
'3': {name: entity.other.captures.yaml-tmlanguage}
'4': {name: punctuation.definition.string.yaml-tmlanguage}
'5': {name: keyword.control.definition.yaml-tmlanguage}
patterns:
name: meta.patterns.yaml-tmlanguage
# "patterns" is one of the 2 keys that are also allowed (required) in global scope
match: (?:, +|\{ *|^ *|^ *- +)((["']?)(patterns)(\2))(:)
captures:
'1': {name: string.other.quoted-or-unquoted.yaml-tmlanguage}
'2': {name: punctuation.definition.string.yaml-tmlanguage}
'3': {name: support.type.patterns.patterns.yaml-tmlanguage}
'4': {name: punctuation.definition.string.yaml-tmlanguage}
'5': {name: keyword.control.definition.yaml-tmlanguage}
# variable keys
number-key:
name: meta.number-key.yaml-tmlanguage
match: (?:, +|\{ *|^ *)((["'])(\d+)(\2))(:)
captures:
'1': {name: string.other.quoted-or-unquoted.yaml-tmlanguage}
'2': {name: punctuation.definition.string.yaml-tmlanguage}
'3': {name: constant.numeric.key.yaml-tmlanguage}
'4': {name: punctuation.definition.string.yaml-tmlanguage}
'5': {name: keyword.control.definition.yaml-tmlanguage}
repository-key:
# More like "any key with two leading spaces"
name: meta.repository-key.yaml-tmlanguage
match: (?:^ )((["']?)([-\w]+)(\2))(:)
captures:
#'1': {name: string.other.quoted-or-unquoted.yaml-tmlanguage} # "string variable" is assigned by certain color schemes
'2': {name: punctuation.definition.string.yaml-tmlanguage}
'3': {name: variable.other.repository-key.yaml-tmlanguage} # entity.name.section.repository-key.yaml-tmlanguage
'4': {name: punctuation.definition.string.yaml-tmlanguage}
'5': {name: keyword.control.definition.yaml-tmlanguage}
repository-key-inline:
# More like "any other key there is"
name: meta.repository-key.yaml-tmlanguage
match: (?:, +|\{ *)((["']?)([-\w]+)(\2))(:)
captures:
#'1': {name: string.other.quoted-or-unquoted.yaml-tmlanguage} # "string variable" is assigned by certain color schemes
'2': {name: punctuation.definition.string.yaml-tmlanguage}
'3': {name: variable.other.repository-key.yaml-tmlanguage}
'4': {name: punctuation.definition.string.yaml-tmlanguage}
'5': {name: keyword.control.definition.yaml-tmlanguage}
unmatched:
# unmatched list entries (e.g. before "{") and commas before newlines
match: ^ *- |,(?= *$| +#)
illegal:
name: invalid.illegal.unrecognized.yaml-tmlanguage
match: '[^\s}]'
...