{ "fileTypes": [ "mson" ], "keyEquivalent": "^~M", "name": "MSON", "patterns": [ { "include": "#mson-field" }, { "include": "#gfm" } ], "repository": { "mson-field": { "patterns": [ { "comment": "+ name: sample (attributes) - description", "begin": "^(?=\\s*[-*+].*?:.*?\\(.*?\\).*?(-|$))", "end": "$", "patterns": [ { "include": "#mson-field-name" }, { "include": "#mson-example-value" }, { "include": "#mson-field-attributes" }, { "include": "#mson-field-description" } ] }, { "comment": "+ name: sample - description", "begin": "^(?=\\s*[-*+].*?:.*?(-|$))", "end": "$", "patterns": [ { "include": "#mson-field-name" }, { "include": "#mson-example-value" }, { "include": "#mson-field-description" } ] }, { "comment": "+ name (attributes) - description", "begin": "^(?=\\s*[-*+].*?\\(.*?\\).*?(-|$))", "end": "$", "patterns": [ { "include": "#mson-field-name" }, { "include": "#mson-field-attributes" }, { "include": "#mson-field-description" } ] }, { "comment": "+ name - description", "begin": "^(?=\\s*[-*+].*?(-|$))", "end": "$", "patterns": [ { "include": "#mson-field-name" }, { "include": "#mson-field-description" } ] } ] }, "mson-field-name": { "name": "mson.field.name", "match": "^\\s*([-*+]).*?(?= ?(:|\\(|-|$))", "captures": { "1": { "name": "variable.unordered.list.gfm" } } }, "mson-example-value": { "match": ":\\s(`.*?`|(.*?)(?=\\(|-|$))", "captures": { "1": { "name": "mson.field.example markup.raw.inline" } } }, "mson-field-attributes": { "name": "mson.field.attributes", "begin": "(?<=[^\\(])\\((?=.*?\\))", "end": "\\)", "patterns": [ { "name": "keyword", "match": "(required|optional|variable|fixed|sample|default)" }, { "name": "entity.name.class", "match": "(boolean|string|number|enum|object|array|\\*)" } ] }, "mson-field-description": { "begin": " (-) ", "end": "$", "beginCaptures": { "1": { "name": "comment" } }, "patterns": [ { "include": "#gfm" } ] }, "gfm": { "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.gfm" }, { "begin": "(?<=^|[^\\w\\d\\*])\\*\\*\\*(?!$|\\*|\\s)", "end": "(?]+)>", "name": "link", "captures": { "1": { "name": "punctuation.definition.begin.gfm" }, "2": { "name": "entity.gfm" }, "3": { "name": "punctuation.definition.end.gfm" }, "4": { "name": "markup.underline.link.gfm" } } }, { "match": "^\\s*(\\[)([^\\]]+)(\\])\\s*(:)\\s*(\\S+)", "name": "link", "captures": { "1": { "name": "punctuation.definition.begin.gfm" }, "2": { "name": "entity.gfm" }, "3": { "name": "punctuation.definition.end.gfm" }, "4": { "name": "punctuation.separator.key-value.gfm" }, "5": { "name": "markup.underline.link.gfm" } } }, { "match": "^\\s*([*+-])[ \\t]+", "captures": { "1": { "name": "variable.unordered.list.gfm" } } }, { "match": "^\\s*(\\d+\\.)[ \\t]+", "captures": { "1": { "name": "variable.ordered.list.gfm" } } }, { "begin": "^\\s*(>)", "end": "^\\s*?$", "beginCaptures": { "1": { "name": "support.quote.gfm" } }, "name": "comment.quote.gfm", "patterns": [ { "include": "$self" } ] }, { "match": "(?<=^|\\s|\"|'|\\(|\\[)(@)(\\w[-\\w:]*)(?=[\\s\"'.,;\\)\\]])", "captures": { "1": { "name": "variable.mention.gfm" }, "2": { "name": "string.username.gfm" } } }, { "match": "(?<=^|\\s|\"|'|\\(|\\[)(#)(\\d+)(?=[\\s\"'\\.,;\\)\\]])", "captures": { "1": { "name": "variable.issue.tag.gfm" }, "2": { "name": "string.issue.number.gfm" } } }, { "match": "( )$", "captures": { "1": { "name": "linebreak.gfm" } } }, { "begin": "