dymokomi/luced
Source of release 0.4.1
0.4.1 / grammars / yaml.tmLanguage.json
{
"name": "YAML",
"scopeName": "source.yaml",
"fileTypes": ["yaml", "yml"],
"patterns": [
{ "include": "#comment" },
{ "include": "#directive" },
{ "include": "#key" },
{ "include": "#anchor" },
{ "include": "#string" },
{ "include": "#constant" },
{ "include": "#number" },
{ "include": "#tag" }
],
"repository": {
"comment": { "match": "(?<!\\S)#.*$", "name": "comment.line.number-sign.yaml" },
"directive": { "match": "^(?:---|\\.\\.\\.).*$", "name": "keyword.control.directive.yaml" },
"key": {
"match": "^\\s*(?:-\\s+)?([^\\s:#][^:#]*?)\\s*:(?=\\s|$)",
"captures": { "1": { "name": "entity.name.tag.yaml" } }
},
"anchor": { "match": "[&*][A-Za-z0-9_-]+", "name": "variable.other.anchor.yaml" },
"string": {
"patterns": [
{ "begin": "\"", "end": "\"", "name": "string.quoted.double.yaml", "patterns": [{ "match": "\\\\.", "name": "constant.character.escape.yaml" }] },
{ "begin": "'", "end": "'", "name": "string.quoted.single.yaml" }
]
},
"constant": { "match": "(?<![\\w-])(?:true|false|null|yes|no|on|off|True|False|Null|~)(?![\\w-])", "name": "constant.language.yaml" },
"number": { "match": "(?<![\\w-])[+-]?(?:0[xob][0-9a-fA-F_]+|\\d[\\d_]*(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)(?![\\w-])", "name": "constant.numeric.yaml" },
"tag": { "match": "!!?[A-Za-z0-9_/-]+", "name": "storage.type.tag.yaml" }
}
}