| 1 |
{ |
| 2 |
"fileTypes": ["toml"], |
| 3 |
"keyEquivalent": "^~T", |
| 4 |
"name": "toml", |
| 5 |
"patterns": [ |
| 6 |
{ |
| 7 |
"include": "#comments" |
| 8 |
}, |
| 9 |
{ |
| 10 |
"include": "#groups" |
| 11 |
}, |
| 12 |
{ |
| 13 |
"include": "#key_pair" |
| 14 |
}, |
| 15 |
{ |
| 16 |
"include": "#invalid" |
| 17 |
} |
| 18 |
], |
| 19 |
"repository": { |
| 20 |
"comments": { |
| 21 |
"begin": "(^[ \\t]+)?(?=#)", |
| 22 |
"beginCaptures": { |
| 23 |
"1": { |
| 24 |
"name": "punctuation.whitespace.comment.leading.toml" |
| 25 |
} |
| 26 |
}, |
| 27 |
"end": "(?!\\G)", |
| 28 |
"patterns": [ |
| 29 |
{ |
| 30 |
"begin": "#", |
| 31 |
"beginCaptures": { |
| 32 |
"0": { |
| 33 |
"name": "punctuation.definition.comment.toml" |
| 34 |
} |
| 35 |
}, |
| 36 |
"end": "\\n", |
| 37 |
"name": "comment.line.number-sign.toml" |
| 38 |
} |
| 39 |
] |
| 40 |
}, |
| 41 |
"groups": { |
| 42 |
"patterns": [ |
| 43 |
{ |
| 44 |
"captures": { |
| 45 |
"1": { |
| 46 |
"name": "punctuation.definition.section.begin.toml" |
| 47 |
}, |
| 48 |
"2": { |
| 49 |
"patterns": [ |
| 50 |
{ |
| 51 |
"match": "[^\\s.]+", |
| 52 |
"name": "entity.name.section.toml" |
| 53 |
} |
| 54 |
] |
| 55 |
}, |
| 56 |
"3": { |
| 57 |
"name": "punctuation.definition.section.begin.toml" |
| 58 |
} |
| 59 |
}, |
| 60 |
"match": "^\\s*(\\[)([^\\[\\]]*)(\\])", |
| 61 |
"name": "meta.group.toml" |
| 62 |
}, |
| 63 |
{ |
| 64 |
"captures": { |
| 65 |
"1": { |
| 66 |
"name": "punctuation.definition.section.begin.toml" |
| 67 |
}, |
| 68 |
"2": { |
| 69 |
"patterns": [ |
| 70 |
{ |
| 71 |
"match": "[^\\s.]+", |
| 72 |
"name": "entity.name.section.toml" |
| 73 |
} |
| 74 |
] |
| 75 |
}, |
| 76 |
"3": { |
| 77 |
"name": "punctuation.definition.section.begin.toml" |
| 78 |
} |
| 79 |
}, |
| 80 |
"match": "^\\s*(\\[\\[)([^\\[\\]]*)(\\]\\])", |
| 81 |
"name": "meta.group.double.toml" |
| 82 |
} |
| 83 |
] |
| 84 |
}, |
| 85 |
"invalid": { |
| 86 |
"match": "\\S+(\\s*(?=\\S))?", |
| 87 |
"name": "invalid.illegal.not-allowed-here.toml" |
| 88 |
}, |
| 89 |
"key_pair": { |
| 90 |
"patterns": [ |
| 91 |
{ |
| 92 |
"begin": "([A-Za-z0-9_-]+)\\s*(=)\\s*", |
| 93 |
"captures": { |
| 94 |
"1": { |
| 95 |
"name": "variable.other.key.toml" |
| 96 |
}, |
| 97 |
"2": { |
| 98 |
"name": "punctuation.separator.key-value.toml" |
| 99 |
} |
| 100 |
}, |
| 101 |
"end": "(?<=\\S)(?<!=)|$", |
| 102 |
"patterns": [ |
| 103 |
{ |
| 104 |
"include": "#primatives" |
| 105 |
} |
| 106 |
] |
| 107 |
}, |
| 108 |
{ |
| 109 |
"begin": "((\")(.*?)(\"))\\s*(=)\\s*", |
| 110 |
"captures": { |
| 111 |
"1": { |
| 112 |
"name": "variable.other.key.toml" |
| 113 |
}, |
| 114 |
"2": { |
| 115 |
"name": "punctuation.definition.variable.begin.toml" |
| 116 |
}, |
| 117 |
"3": { |
| 118 |
"patterns": [ |
| 119 |
{ |
| 120 |
"match": "\\\\([btnfr\"\\\\]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})", |
| 121 |
"name": "constant.character.escape.toml" |
| 122 |
}, |
| 123 |
{ |
| 124 |
"match": "\\\\[^btnfr\"\\\\]", |
| 125 |
"name": "invalid.illegal.escape.toml" |
| 126 |
}, |
| 127 |
{ |
| 128 |
"match": "\"", |
| 129 |
"name": "invalid.illegal.not-allowed-here.toml" |
| 130 |
} |
| 131 |
] |
| 132 |
}, |
| 133 |
"4": { |
| 134 |
"name": "punctuation.definition.variable.end.toml" |
| 135 |
}, |
| 136 |
"5": { |
| 137 |
"name": "punctuation.separator.key-value.toml" |
| 138 |
} |
| 139 |
}, |
| 140 |
"end": "(?<=\\S)(?<!=)|$", |
| 141 |
"patterns": [ |
| 142 |
{ |
| 143 |
"include": "#primatives" |
| 144 |
} |
| 145 |
] |
| 146 |
}, |
| 147 |
{ |
| 148 |
"begin": "((')([^']*)('))\\s*(=)\\s*", |
| 149 |
"captures": { |
| 150 |
"1": { |
| 151 |
"name": "variable.other.key.toml" |
| 152 |
}, |
| 153 |
"2": { |
| 154 |
"name": "punctuation.definition.variable.begin.toml" |
| 155 |
}, |
| 156 |
"4": { |
| 157 |
"name": "punctuation.definition.variable.end.toml" |
| 158 |
}, |
| 159 |
"5": { |
| 160 |
"name": "punctuation.separator.key-value.toml" |
| 161 |
} |
| 162 |
}, |
| 163 |
"end": "(?<=\\S)(?<!=)|$", |
| 164 |
"patterns": [ |
| 165 |
{ |
| 166 |
"include": "#primatives" |
| 167 |
} |
| 168 |
] |
| 169 |
}, |
| 170 |
{ |
| 171 |
"begin": "(?x)\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t(?:\n\t\t\t\t\t\t\t\t\t[A-Za-z0-9_-]+\t\t\t\t# Bare key\n\t\t\t\t\t\t\t\t | \" (?:[^\"\\\\]|\\\\.)* \"\t\t# Double quoted key\n\t\t\t\t\t\t\t\t | ' [^']* '\t\t# Sindle quoted key\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t(?:\n\t\t\t\t\t\t\t\t\t\\s* \\. \\s*\t\t\t\t\t# Dot\n\t\t\t\t\t\t\t\t | (?= \\s* =)\t\t\t\t\t# or look-ahead for equals\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t){2,}\t\t\t\t\t\t\t\t# Ensure at least one dot\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\\s*(=)\\s*\n\t\t\t\t\t", |
| 172 |
"captures": { |
| 173 |
"1": { |
| 174 |
"name": "variable.other.key.toml", |
| 175 |
"patterns": [ |
| 176 |
{ |
| 177 |
"match": "\\.", |
| 178 |
"name": "punctuation.separator.variable.toml" |
| 179 |
}, |
| 180 |
{ |
| 181 |
"captures": { |
| 182 |
"1": { |
| 183 |
"name": "punctuation.definition.variable.begin.toml" |
| 184 |
}, |
| 185 |
"2": { |
| 186 |
"patterns": [ |
| 187 |
{ |
| 188 |
"match": "\\\\([btnfr\"\\\\]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})", |
| 189 |
"name": "constant.character.escape.toml" |
| 190 |
}, |
| 191 |
{ |
| 192 |
"match": "\\\\[^btnfr\"\\\\]", |
| 193 |
"name": "invalid.illegal.escape.toml" |
| 194 |
} |
| 195 |
] |
| 196 |
}, |
| 197 |
"3": { |
| 198 |
"name": "punctuation.definition.variable.end.toml" |
| 199 |
} |
| 200 |
}, |
| 201 |
"match": "(\")((?:[^\"\\\\]|\\\\.)*)(\")" |
| 202 |
}, |
| 203 |
{ |
| 204 |
"captures": { |
| 205 |
"1": { |
| 206 |
"name": "punctuation.definition.variable.begin.toml" |
| 207 |
}, |
| 208 |
"2": { |
| 209 |
"name": "punctuation.definition.variable.end.toml" |
| 210 |
} |
| 211 |
}, |
| 212 |
"match": "(')[^']*(')" |
| 213 |
} |
| 214 |
] |
| 215 |
}, |
| 216 |
"3": { |
| 217 |
"name": "punctuation.separator.key-value.toml" |
| 218 |
} |
| 219 |
}, |
| 220 |
"comment": "Dotted key", |
| 221 |
"end": "(?<=\\S)(?<!=)|$", |
| 222 |
"patterns": [ |
| 223 |
{ |
| 224 |
"include": "#primatives" |
| 225 |
} |
| 226 |
] |
| 227 |
} |
| 228 |
] |
| 229 |
}, |
| 230 |
"primatives": { |
| 231 |
"patterns": [ |
| 232 |
{ |
| 233 |
"begin": "\\G\"\"\"", |
| 234 |
"beginCaptures": { |
| 235 |
"0": { |
| 236 |
"name": "punctuation.definition.string.begin.toml" |
| 237 |
} |
| 238 |
}, |
| 239 |
"end": "\"{3,5}", |
| 240 |
"endCaptures": { |
| 241 |
"0": { |
| 242 |
"name": "punctuation.definition.string.end.toml" |
| 243 |
} |
| 244 |
}, |
| 245 |
"name": "string.quoted.triple.double.toml", |
| 246 |
"patterns": [ |
| 247 |
{ |
| 248 |
"match": "\\\\([btnfr\"\\\\]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})", |
| 249 |
"name": "constant.character.escape.toml" |
| 250 |
}, |
| 251 |
{ |
| 252 |
"match": "\\\\[^btnfr\"\\\\\\n]", |
| 253 |
"name": "invalid.illegal.escape.toml" |
| 254 |
} |
| 255 |
] |
| 256 |
}, |
| 257 |
{ |
| 258 |
"begin": "\\G\"", |
| 259 |
"beginCaptures": { |
| 260 |
"0": { |
| 261 |
"name": "punctuation.definition.string.begin.toml" |
| 262 |
} |
| 263 |
}, |
| 264 |
"end": "\"", |
| 265 |
"endCaptures": { |
| 266 |
"0": { |
| 267 |
"name": "punctuation.definition.string.end.toml" |
| 268 |
} |
| 269 |
}, |
| 270 |
"name": "string.quoted.double.toml", |
| 271 |
"patterns": [ |
| 272 |
{ |
| 273 |
"match": "\\\\([btnfr\"\\\\]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})", |
| 274 |
"name": "constant.character.escape.toml" |
| 275 |
}, |
| 276 |
{ |
| 277 |
"match": "\\\\[^btnfr\"\\\\]", |
| 278 |
"name": "invalid.illegal.escape.toml" |
| 279 |
} |
| 280 |
] |
| 281 |
}, |
| 282 |
{ |
| 283 |
"begin": "\\G'''", |
| 284 |
"beginCaptures": { |
| 285 |
"0": { |
| 286 |
"name": "punctuation.definition.string.begin.toml" |
| 287 |
} |
| 288 |
}, |
| 289 |
"end": "'{3,5}", |
| 290 |
"endCaptures": { |
| 291 |
"0": { |
| 292 |
"name": "punctuation.definition.string.end.toml" |
| 293 |
} |
| 294 |
}, |
| 295 |
"name": "string.quoted.triple.single.toml" |
| 296 |
}, |
| 297 |
{ |
| 298 |
"begin": "\\G'", |
| 299 |
"beginCaptures": { |
| 300 |
"0": { |
| 301 |
"name": "punctuation.definition.string.begin.toml" |
| 302 |
} |
| 303 |
}, |
| 304 |
"end": "'", |
| 305 |
"endCaptures": { |
| 306 |
"0": { |
| 307 |
"name": "punctuation.definition.string.end.toml" |
| 308 |
} |
| 309 |
}, |
| 310 |
"name": "string.quoted.single.toml" |
| 311 |
}, |
| 312 |
{ |
| 313 |
"match": "\\G(?x)\n\t\t\t\t\t\t[0-9]{4}\n\t\t\t\t\t\t-\n\t\t\t\t\t\t(0[1-9]|1[012])\n\t\t\t\t\t\t-\n\t\t\t\t\t\t(?!00|3[2-9])[0-3][0-9]\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t[Tt ]\n\t\t\t\t\t\t\t(?!2[5-9])[0-2][0-9]\n\t\t\t\t\t\t\t:\n\t\t\t\t\t\t\t[0-5][0-9]\n\t\t\t\t\t\t\t:\n\t\t\t\t\t\t\t(?!6[1-9])[0-6][0-9]\n\t\t\t\t\t\t\t(\\.[0-9]+)?\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\tZ\n\t\t\t\t\t\t\t | [+-](?!2[5-9])[0-2][0-9]:[0-5][0-9]\n\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t)?\n\t\t\t\t\t", |
| 314 |
"name": "constant.other.date.toml" |
| 315 |
}, |
| 316 |
{ |
| 317 |
"match": "\\G(?x)\n\t\t\t\t\t\t(?!2[5-9])[0-2][0-9]\n\t\t\t\t\t\t:\n\t\t\t\t\t\t[0-5][0-9]\n\t\t\t\t\t\t:\n\t\t\t\t\t\t(?!6[1-9])[0-6][0-9]\n\t\t\t\t\t\t(\\.[0-9]+)?\n\t\t\t\t\t", |
| 318 |
"name": "constant.other.time.toml" |
| 319 |
}, |
| 320 |
{ |
| 321 |
"match": "\\G(true|false)", |
| 322 |
"name": "constant.language.boolean.toml" |
| 323 |
}, |
| 324 |
{ |
| 325 |
"match": "\\G0x\\h(\\h|_\\h)*", |
| 326 |
"name": "constant.numeric.hex.toml" |
| 327 |
}, |
| 328 |
{ |
| 329 |
"match": "\\G0o[0-7]([0-7]|_[0-7])*", |
| 330 |
"name": "constant.numeric.octal.toml" |
| 331 |
}, |
| 332 |
{ |
| 333 |
"match": "\\G0b[01]([01]|_[01])*", |
| 334 |
"name": "constant.numeric.binary.toml" |
| 335 |
}, |
| 336 |
{ |
| 337 |
"match": "\\G[+-]?(inf|nan)", |
| 338 |
"name": "constant.numeric.toml" |
| 339 |
}, |
| 340 |
{ |
| 341 |
"match": "(?x)\n\t\t\t\t\t\t\\G\n\t\t\t\t\t\t(\n\t\t\t\t\t\t [+-]?\n\t\t\t\t\t\t (\n\t\t\t\t\t\t\t\t0\n\t\t\t\t\t\t\t | ([1-9](([0-9]|_[0-9])+)?)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t(?=[.eE])\n\t\t\t\t\t\t(\n\t\t\t\t\t\t \\.\n\t\t\t\t\t\t ([0-9](([0-9]|_[0-9])+)?)\n\t\t\t\t\t\t)?\n\t\t\t\t\t\t(\n\t\t\t\t\t\t [eE]\n\t\t\t\t\t\t ([+-]?[0-9](([0-9]|_[0-9])+)?)\n\t\t\t\t\t\t)?\n\t\t\t\t\t", |
| 342 |
"name": "constant.numeric.float.toml" |
| 343 |
}, |
| 344 |
{ |
| 345 |
"match": "(?x)\n\t\t\t\t\t\t\\G\n\t\t\t\t\t\t(\n\t\t\t\t\t\t [+-]?\n\t\t\t\t\t\t (\n\t\t\t\t\t\t\t\t0\n\t\t\t\t\t\t\t | ([1-9](([0-9]|_[0-9])+)?)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t", |
| 346 |
"name": "constant.numeric.integer.toml" |
| 347 |
}, |
| 348 |
{ |
| 349 |
"begin": "\\G\\[", |
| 350 |
"beginCaptures": { |
| 351 |
"0": { |
| 352 |
"name": "punctuation.definition.array.begin.toml" |
| 353 |
} |
| 354 |
}, |
| 355 |
"end": "\\]", |
| 356 |
"endCaptures": { |
| 357 |
"0": { |
| 358 |
"name": "punctuation.definition.array.end.toml" |
| 359 |
} |
| 360 |
}, |
| 361 |
"name": "meta.array.toml", |
| 362 |
"patterns": [ |
| 363 |
{ |
| 364 |
"begin": "(?=[\"'']|[+-]?[0-9]|[+-]?(inf|nan)|true|false|\\[|\\{)", |
| 365 |
"end": ",|(?=])", |
| 366 |
"endCaptures": { |
| 367 |
"0": { |
| 368 |
"name": "punctuation.separator.array.toml" |
| 369 |
} |
| 370 |
}, |
| 371 |
"patterns": [ |
| 372 |
{ |
| 373 |
"include": "#primatives" |
| 374 |
}, |
| 375 |
{ |
| 376 |
"include": "#comments" |
| 377 |
}, |
| 378 |
{ |
| 379 |
"include": "#invalid" |
| 380 |
} |
| 381 |
] |
| 382 |
}, |
| 383 |
{ |
| 384 |
"include": "#comments" |
| 385 |
}, |
| 386 |
{ |
| 387 |
"include": "#invalid" |
| 388 |
} |
| 389 |
] |
| 390 |
}, |
| 391 |
{ |
| 392 |
"begin": "\\G\\{", |
| 393 |
"beginCaptures": { |
| 394 |
"0": { |
| 395 |
"name": "punctuation.definition.inline-table.begin.toml" |
| 396 |
} |
| 397 |
}, |
| 398 |
"end": "\\}", |
| 399 |
"endCaptures": { |
| 400 |
"0": { |
| 401 |
"name": "punctuation.definition.inline-table.end.toml" |
| 402 |
} |
| 403 |
}, |
| 404 |
"name": "meta.inline-table.toml", |
| 405 |
"patterns": [ |
| 406 |
{ |
| 407 |
"begin": "(?=\\S)", |
| 408 |
"end": ",|(?=})", |
| 409 |
"endCaptures": { |
| 410 |
"0": { |
| 411 |
"name": "punctuation.separator.inline-table.toml" |
| 412 |
} |
| 413 |
}, |
| 414 |
"patterns": [ |
| 415 |
{ |
| 416 |
"include": "#key_pair" |
| 417 |
} |
| 418 |
] |
| 419 |
}, |
| 420 |
{ |
| 421 |
"include": "#comments" |
| 422 |
} |
| 423 |
] |
| 424 |
} |
| 425 |
] |
| 426 |
} |
| 427 |
}, |
| 428 |
"scopeName": "source.toml", |
| 429 |
"uuid": "7DEF2EDB-5BB7-4DD2-9E78-3541A26B7923" |
| 430 |
} |
| 431 |
|