{ "name": "textproto", "scopeName": "source.textproto", "fileTypes": ["textproto", "textpb", "pbtxt"], "patterns": [ { "include": "#comment" }, { "include": "#block" }, { "include": "#field" }, { "include": "#string" }, { "include": "#constant" }, { "include": "#number" } ], "repository": { "comment": { "name": "comment.line.number-sign.textproto", "match": "#.*$" }, "block": { "comment": "A field whose value is a message: `peers {`", "match": "\\b([A-Za-z_][A-Za-z0-9_]*)\\s*:?\\s*(?=\\{)", "captures": { "1": { "name": "entity.name.tag.textproto" } } }, "field": { "match": "\\b([A-Za-z_][A-Za-z0-9_]*)\\s*(:)", "captures": { "1": { "name": "support.type.property-name.textproto" }, "2": { "name": "punctuation.separator.key-value.textproto" } } }, "string": { "patterns": [ { "name": "string.quoted.double.textproto", "begin": "\"", "end": "\"", "patterns": [{ "name": "constant.character.escape.textproto", "match": "\\\\." }] }, { "name": "string.quoted.single.textproto", "begin": "'", "end": "'", "patterns": [{ "name": "constant.character.escape.textproto", "match": "\\\\." }] } ] }, "constant": { "patterns": [ { "name": "constant.language.boolean.textproto", "match": "\\b(true|false)\\b" }, { "name": "constant.language.enum.textproto", "match": "\\b[A-Z][A-Z0-9_]*\\b" } ] }, "number": { "name": "constant.numeric.textproto", "match": "-?\\b(0x[0-9A-Fa-f]+|[0-9]+(\\.[0-9]+)?([eE][+-]?[0-9]+)?)\\b" } } }