{ "scopeName": "source.yaml", "name": "YAML", "fileTypes": [ "clang-format", "eslintrc", "eyaml", "eyml", "yaml", "yaml.erb", "yml", "yml.erb", "sls", "sublime-syntax", "Boxfile" ], "firstLineMatch": "^(#cloud-config|---)", "patterns": [ { "include": "#erb" }, { "include": "#comment" }, { "match": "\\t+", "name": "invalid.illegal.whitespace.yaml" }, { "match": "^---", "name": "punctuation.definition.directives.end.yaml" }, { "begin": "^(\\s*)(?!-\\s*)(\\S+)\\s*(:)\\s*(?=\\||>)", "beginCaptures": { "2": { "name": "entity.name.tag.yaml" }, "3": { "name": "punctuation.separator.key-value.yaml" } }, "end": "^(?!\\1\\s+)(?=\\s*(-|[^!@#%&*>,].*:|#))", "contentName": "string.unquoted.block.yaml", "patterns": [ { "include": "#constants" }, { "include": "#erb" } ] }, { "begin": "^(\\s*)(?:(-)|(?:(?:(-)\\s*)?(\\S+)\\s*(:)))\\s*(?=\\||>)", "beginCaptures": { "2": { "name": "punctuation.definition.entry.yaml" }, "3": { "name": "punctuation.definition.entry.yaml" }, "4": { "name": "entity.name.tag.yaml" }, "5": { "name": "punctuation.separator.key-value.yaml" } }, "end": "^(?!\\1 \\4\\s+)(?=\\s*(-|[^!@#%&*>,].*:|#))", "contentName": "string.unquoted.block.yaml", "patterns": [ { "include": "#constants" }, { "include": "#erb" } ] }, { "match": "(<<)\\s*(:)\\s+(.+)$", "captures": { "1": { "name": "entity.name.tag.merge.yaml" }, "2": { "name": "punctuation.separator.key-value.yaml" }, "3": { "patterns": [ { "include": "#variables" } ] } } }, { "begin": "(?>^\\s*(-)?\\s*)([^!{@#%&*>,'\"][^#'\"]*?)(:)\\s+((!!)omap)?", "beginCaptures": { "1": { "name": "punctuation.definition.entry.yaml" }, "2": { "name": "entity.name.tag.yaml" }, "3": { "name": "punctuation.separator.key-value.yaml" }, "4": { "name": "keyword.other.omap.yaml" }, "5": { "name": "punctuation.definition.tag.omap.yaml" } }, "end": "(?=^\\s*(-|[^!{@#%&*>,].*:\\s+))", "patterns": [ { "include": "#scalar-content" } ] }, { "begin": "(-)?\\s*(?:((')([^']*?)('))|((\")([^\"]*?)(\")))(:)\\s+((!!)omap)?", "beginCaptures": { "1": { "name": "punctuation.definition.entry.yaml" }, "2": { "name": "string.quoted.single.yaml" }, "3": { "name": "punctuation.definition.string.begin.yaml" }, "4": { "name": "entity.name.tag.yaml" }, "5": { "name": "punctuation.definition.string.end.yaml" }, "6": { "name": "string.quoted.double.yaml" }, "7": { "name": "punctuation.definition.string.begin.yaml" }, "8": { "name": "entity.name.tag.yaml" }, "9": { "name": "punctuation.definition.string.end.yaml" }, "10": { "name": "punctuation.separator.key-value.yaml" }, "11": { "name": "keyword.other.omap.yaml" }, "12": { "name": "punctuation.definition.tag.omap.yaml" } }, "end": "(?=^\\s*(-|[^!{@#%&*>,].*:\\s+))", "patterns": [ { "include": "#scalar-content" } ] }, { "begin": "(-)\\s+(?:((!!)omap)|(?![!@#%&*>,]))", "beginCaptures": { "1": { "name": "punctuation.definition.entry.yaml" }, "2": { "name": "keyword.other.omap.yaml" }, "3": { "name": "punctuation.definition.tag.omap.yaml" } }, "end": "(?=^\\s*(-|[^!{@#%&*>,].*:))", "patterns": [ { "include": "#scalar-content" } ] }, { "include": "#variables" }, { "include": "#strings" } ], "repository": { "comment": { "match": "(?<=^|\\s)((#(?!{)).*)", "captures": { "1": { "name": "comment.line.number-sign.yaml" }, "2": { "name": "punctuation.definition.comment.yaml" } } }, "constants": { "match": "(?<=\\s)(true|false|null)(?=\\s*$)", "name": "constant.language.yaml" }, "date": { "match": "([0-9]{4}-[0-9]{2}-[0-9]{2})\\s*($|(?=#)(?!#{))", "captures": { "1": { "name": "constant.other.date.yaml" } } }, "erb": { "begin": "<%+(?!>)=?", "beginCaptures": { "0": { "name": "punctuation.definition.embedded.begin.ruby" } }, "contentName": "source.ruby.rails", "end": "(%)>", "endCaptures": { "0": { "name": "punctuation.definition.embedded.end.ruby" }, "1": { "name": "source.ruby.rails" } }, "name": "meta.embedded.line.ruby", "patterns": [ { "captures": { "1": { "name": "punctuation.definition.comment.ruby" } }, "match": "(#).*?(?=%>)", "name": "comment.line.number-sign.ruby" }, { "include": "source.ruby.rails" } ] }, "escaped_char": { "match": "\\\\.", "name": "constant.character.escape.yaml" }, "numeric": { "match": "(((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f)?)\\s*($|(?=#)(?!#{))", "captures": { "1": { "name": "constant.numeric.yaml" } } }, "strings": { "patterns": [ { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.yaml" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.yaml" } }, "name": "string.quoted.double.yaml", "patterns": [ { "include": "#escaped_char" }, { "include": "#erb" } ] }, { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.yaml" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.yaml" } }, "name": "string.quoted.single.yaml", "patterns": [ { "include": "#escaped_char" }, { "include": "#erb" } ] }, { "begin": "`", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.yaml" } }, "end": "`", "endCaptures": { "0": { "name": "punctuation.definition.string.end.yaml" } }, "name": "string.interpolated.yaml", "patterns": [ { "include": "#escaped_char" }, { "include": "#erb" } ] }, { "match": "[^\\s\"'\\n](?!\\s*#(?!{))([^#\\n]|((?