{ "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", "fileTypes": ["astro"], "foldingStartMarker": "(?x)\n(<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|li|form|dl)\\b.*?>\n|)$\n|<\\?(?:php)?.*\\b(if|for(each)?|while)\\b.+:\n|\\{\\{?(if|foreach|capture|literal|foreach|php|section|strip)\n|\\{\\s*($|\\?>\\s*$|//|/\\*(.*\\*/\\s*$|(?!.*?\\*/)))\n)", "foldingStopMarker": "(?x)\n(\n|^(?!.*?$\n|<\\?(?:php)?.*\\bend(if|for(each)?|while)\\b\n|\\{\\{?/(if|foreach|capture|literal|foreach|php|section|strip)\n|^[^{]*\\}\n)", "keyEquivalent": "^~H", "name": "astro", "scopeName": "text.html.astro", "patterns": [ { "include": "#astro:markdown" }, { "include": "#astro:expressions" }, { "include": "#html:comment" }, { "include": "#html:comment:bogus" }, { "include": "#html:doctype" }, { "include": "#astro:fragment" }, { "include": "#astro:lang" }, { "include": "#astro:component" }, { "include": "#html:element" }, { "include": "#html:entity" }, { "include": "#html:entity:bogus" }, { "include": "#frontmatter" } ], "repository": { "astro:attribute": { "patterns": [ { "include": "#html:attribute" }, { "include": "#string-double-quoted" }, { "include": "#string-single-quoted" }, { "include": "#string-template-literal" }, { "include": "#astro:expressions" } ] }, "astro:component": { "name": "meta.tag.component.astro", "begin": "(]*|[^/?!\\s<>.]+\\.[^/?!\\s<>]+)\\b", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.astro" }, "2": { "name": "entity.name.tag.astro support.class.component.astro" } }, "end": "(/?>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.astro" } }, "patterns": [ { "include": "#astro:attribute" } ] }, "astro:fragment": { "name": "meta.tag.component.astro", "match": "()", "captures": { "1": { "name": "punctuation.definition.tag.astro" }, "2": { "name": "entity.name.tag.astro support.class.fragment.astro" }, "3": { "name": "punctuation.definition.tag.astro" } } }, "astro:lang": { "begin": "(<)(?:(S(?i:cript|tyle))|((?i:script|style)))(?![\\w:-])", "beginCaptures": { "0": { "name": "meta.tag.metadata.$2$3.start.html" }, "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.astro support.class.component.astro" }, "3": { "name": "entity.name.tag.html" } }, "end": "()", "endCaptures": { "0": { "name": "meta.tag.metadata.$2$3.end.html" }, "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.astro support.class.component.astro" }, "3": { "name": "entity.name.tag.html" }, "4": { "name": "punctuation.definition.tag.end.html" } }, "patterns": [ { "begin": "\\G", "end": "(>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } }, "patterns": [ { "include": "#astro:attribute" } ] }, { "begin": "(?<=(?i:lang)=(['\"`]?)(?i:css)\\1[^>]*>)(?!\\G)", "end": "(?=]*>)(?!\\G)", "end": "(?=]*>)(?!\\G)", "end": "(?=]*>)(?!\\G)", "end": "(?=]*>)(?!\\G)", "end": "(?=]*>)(?!\\G)", "end": "(?=]*>)(?!\\G)", "end": "(?=]*>)(?!\\G)", "end": "(?=]*>)(?!\\G)", "end": "(?=]*>)(?!\\G)", "end": "(?=", "endCaptures": { "0": { "name": "punctuation.definition.comment.html punctuation.definition.comment.end.html" } } }, "html:comment:bogus": { "name": "comment.block.html", "begin": "<\\?", "captures": { "0": { "name": "punctuation.definition.comment.html" } }, "beginCaptures": { "0": { "name": "punctuation.definition.comment.html punctuation.definition.comment.begin.html" } }, "end": ">", "endCaptures": { "0": { "name": "punctuation.definition.comment.html punctuation.definition.comment.end.html" } } }, "html:doctype": { "name": "meta.tag.metadata.doctype.html", "begin": "(", "endCaptures": { "0": { "name": "punctuation.definition.tag.html punctuation.definition.tag.end.html" } }, "patterns": [ { "begin": "\"", "end": "\"", "name": "string.quoted.double.html" }, { "match": "[^\\s>]+", "name": "entity.other.attribute-name.html" } ] }, "html:element": { "patterns": [ { "name": "meta.tag.any.$2.start.html", "begin": "(<)([^/?!\\s<>]+)(?=\\s|/?>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.html" } }, "end": "/?>", "endCaptures": { "0": { "name": "punctuation.definition.tag.end.html" } }, "patterns": [ { "include": "#astro:attribute" } ] }, { "name": "meta.tag.any.$2.end.html", "begin": "(]+)(?=\\s|/?>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.html" } }, "end": "/?>", "endCaptures": { "0": { "name": "punctuation.definition.tag.end.html" } }, "patterns": [ { "include": "#astro:attribute" } ] } ] }, "html:entity": { "name": "constant.character.entity.html", "match": "(&)([0-9A-Za-z]+|#x[0-9A-Fa-f]+|x[0-9]+)(;)", "captures": { "1": { "name": "punctuation.definition.entity.html" }, "3": { "name": "punctuation.definition.entity.html" } } }, "html:entity:bogus": { "name": "constant.character.entity.html", "match": "(&)([0-9A-Za-z]+|#x[0-9A-Fa-f]+|x[0-9]+)", "captures": { "1": { "name": "invalid.illegal.bad-ampersand.html" }, "3": { "name": "punctuation.definition.entity.html" } } }, "astro:expressions": { "patterns": [ { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.generic.begin.html" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.generic.end.html" } }, "name": "expression.embbeded.astro", "contentName": "source.tsx", "patterns": [ { "include": "source.tsx" } ] } ] }, "astro:markdown": { "name": "text.html.astro.markdown", "begin": "(<)(Markdown)(>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.html" }, "3": { "name": "punctuation.definition.tag.end.html" } }, "end": "()", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.html" }, "3": { "name": "punctuation.definition.tag.end.html" } }, "patterns": [ { "include": "text.html.markdown.astro" } ] }, "frontmatter": { "begin": "\\A(-{3})\\s*$", "beginCaptures": { "1": { "name": "comment.block.html" } }, "contentName": "source.ts", "patterns": [ { "include": "source.ts" } ], "end": "(^|\\G)(-{3})|\\.{3}\\s*$", "endCaptures": { "2": { "name": "comment.block.html" } } }, "string-double-quoted": { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "name": "string.quoted.double.html", "patterns": [ { "include": "#html:entity" }, { "include": "#html:entity:bogus" } ] }, "string-single-quoted": { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "name": "string.quoted.single.html", "patterns": [ { "include": "#html:entity" }, { "include": "#html:entity:bogus" } ] }, "string-template-literal": { "begin": "`", "end": "`", "name": "string.template.html", "patterns": [ { "include": "source.tsx#template-substitution-element" } ] } } }