diff --git a/HTML.yaml b/HTML.yaml
new file mode 100644
index 0000000..6b73f5c
--- /dev/null
+++ b/HTML.yaml
@@ -0,0 +1,639 @@
+%YAML 1.2
+---
+name: HTML
+file_extensions:
+ - html
+ - htm
+ - shtml
+ - xhtml
+ - inc
+ - tmpl
+ - tpl
+first_line_match: (?i)<(!DOCTYPE\s*)?html
+scope: text.html.basic
+
+variables:
+ attribute_char: (?:[^ "'>/=\x00-\x1f\x7f-\x9f])
+ unquoted_attribute_value: (?:[^\s<>/''"]|/(?!>))+
+ not_equals_lookahead: (?=\s*[^\s=])
+
+ block_tag_name: |-
+ (?ix)(?:
+ address|applet|article|aside|blockquote|center|dd|dir|div|dl|dt|figcaption|figure|footer|frame|frameset|h1|h2|h3|h4|h5|h6|header|iframe|menu|nav|noframes|object|ol|p|pre|section|ul
+ )\b
+
+ inline_tag_name: |-
+ (?ix)(?:
+ abbr|acronym|area|audio|b|base|basefont|bdi|bdo|big|br|canvas|caption|cite|code|del|details|dfn|dialog|em|font|head|html|i|img|ins|isindex|kbd|li|link|map|mark|menu|menuitem|meta|noscript|param|picture|q|rp|rt|rtc|ruby|s|samp|script|small|source|span|strike|strong|style|sub|summary|sup|time|title|track|tt|u|var|video|wbr
+ )\b
+
+ form_tag_name: |-
+ (?ix)(?:
+ button|datalist|input|label|legend|meter|optgroup|option|output|progress|select|template|textarea
+ )\b
+
+ javascript_mime_type: |-
+ (?ix)(?:
+ # https://mimesniff.spec.whatwg.org/#javascript-mime-type
+ (?:application|text)/(?:x-)?(?:java|ecma)script
+ | text/javascript1\.[0-5]
+ | text/jscript
+ | text/livescript
+ )
+
+contexts:
+ immediately-pop:
+ - match: ''
+ pop: true
+
+ else-pop:
+ - match: (?=\S)
+ pop: true
+
+ main:
+ - match: (<\?)(xml)
+ captures:
+ 1: punctuation.definition.tag.begin.html
+ 2: entity.name.tag.xml.html
+ push:
+ - meta_scope: meta.tag.preprocessor.xml.html
+ - match: '\?>'
+ scope: punctuation.definition.tag.end.html
+ pop: true
+ - include: tag-generic-attribute
+ - include: string-double-quoted
+ - include: string-single-quoted
+ - match: ('
+ scope: invalid.illegal.bad-comments-or-CDATA.html
+ - match: "
+ scope: punctuation.definition.tag.html
+ pop: true
+ - match: (?i:DOCTYPE)
+ scope: entity.name.tag.doctype.html
+ push:
+ - meta_scope: meta.tag.sgml.doctype.html
+ - match: (?=>)
+ pop: true
+ - match: '"[^">]*"'
+ scope: string.quoted.double.doctype.identifiers-and-DTDs.html
+ - match: '\[CDATA\['
+ push:
+ - meta_scope: constant.other.inline-data.html
+ - match: ']](?=>)'
+ pop: true
+ - match: (\s*)(?!--|>)\S(\s*)
+ scope: invalid.illegal.bad-comments-or-CDATA.html
+ - match: (?)([a-z_][a-z0-9:_]*-[a-z0-9:_-]+)
+ captures:
+ 1: punctuation.definition.tag.begin.html
+ 2: entity.name.tag.custom.html
+ push:
+ - meta_scope: meta.tag.custom.html
+ - match: '(?: ?/)?>'
+ scope: punctuation.definition.tag.end.html
+ pop: true
+ - include: tag-attributes
+ - match: (<)((?i:style))\b
+ captures:
+ 0: meta.tag.style.begin.html
+ 1: punctuation.definition.tag.begin.html
+ 2: entity.name.tag.style.html
+ push: style-css
+ - match: '(<)((?i:script))\b'
+ captures:
+ 0: meta.tag.script.begin.html
+ 1: punctuation.definition.tag.begin.html
+ 2: entity.name.tag.script.html
+ push: script-javascript
+ - match: (?)((?i:body|head|html)\b)
+ captures:
+ 1: punctuation.definition.tag.begin.html
+ 2: entity.name.tag.structure.any.html
+ push:
+ - meta_scope: meta.tag.structure.any.html
+ - match: '>'
+ scope: punctuation.definition.tag.end.html
+ pop: true
+ - include: tag-attributes
+ - match: (?)({{block_tag_name}})
+ captures:
+ 1: punctuation.definition.tag.begin.html
+ 2: entity.name.tag.block.any.html
+ push:
+ - meta_scope: meta.tag.block.any.html
+ - match: '>'
+ scope: punctuation.definition.tag.end.html
+ pop: true
+ - include: tag-attributes
+ - match: (?)((?i:hr)\b)
+ captures:
+ 1: punctuation.definition.tag.begin.html
+ 2: entity.name.tag.block.any.html
+ push:
+ - meta_scope: meta.tag.block.any.html
+ - match: '(?: ?/)?>'
+ scope: punctuation.definition.tag.end.html
+ pop: true
+ - include: tag-attributes
+ - match: (?)((?i:form|fieldset)\b)
+ captures:
+ 1: punctuation.definition.tag.begin.html
+ 2: entity.name.tag.block.form.html
+ push:
+ - meta_scope: meta.tag.block.form.html
+ - match: '>'
+ scope: punctuation.definition.tag.end.html
+ pop: true
+ - include: tag-attributes
+ - match: (?)({{inline_tag_name}})
+ captures:
+ 1: punctuation.definition.tag.begin.html
+ 2: entity.name.tag.inline.any.html
+ push:
+ - meta_scope: meta.tag.inline.any.html
+ - match: '(?: ?/)?>'
+ scope: punctuation.definition.tag.end.html
+ pop: true
+ - include: tag-attributes
+ - match: (?)({{form_tag_name}})
+ captures:
+ 1: punctuation.definition.tag.begin.html
+ 2: entity.name.tag.inline.form.html
+ push:
+ - meta_scope: meta.tag.inline.form.html
+ - match: '(?: ?/)?>'
+ scope: punctuation.definition.tag.end.html
+ pop: true
+ - include: tag-attributes
+ - match: (?)((?i:a)\b)
+ captures:
+ 1: punctuation.definition.tag.begin.html
+ 2: entity.name.tag.inline.a.html
+ push:
+ - meta_scope: meta.tag.inline.a.html
+ - match: '(?: ?/)?>'
+ scope: punctuation.definition.tag.end.html
+ pop: true
+ - include: tag-attributes
+ - match: (?)((?i:col|colgroup|table|tbody|td|tfoot|th|thead|tr)\b)
+ captures:
+ 1: punctuation.definition.tag.begin.html
+ 2: entity.name.tag.inline.table.html
+ push:
+ - meta_scope: meta.tag.inline.table.html
+ - match: '(?: ?/)?>'
+ scope: punctuation.definition.tag.end.html
+ pop: true
+ - include: tag-attributes
+ - match: (?)([A-Za-z0-9:_]+-[A-Za-z0-9:_-]+)
+ captures:
+ 1: punctuation.definition.tag.begin.html
+ 2: invalid.illegal.uppercase-custom-tag-name.html
+ push:
+ - meta_scope: meta.tag.custom.html
+ - match: '(?: ?/)?>'
+ scope: punctuation.definition.tag.end.html
+ pop: true
+ - include: tag-attributes
+ - match: (?)([a-zA-Z0-9:]+)
+ captures:
+ 1: punctuation.definition.tag.begin.html
+ 2: entity.name.tag.other.html
+ push:
+ - meta_scope: meta.tag.other.html
+ - match: '(?: ?/)?>'
+ scope: punctuation.definition.tag.end.html
+ pop: true
+ - include: tag-attributes
+ - include: entities
+ - match: <>
+ scope: invalid.illegal.incomplete.html
+
+ entities:
+ - match: ([xX])(\h+)(;)
+ scope: constant.character.entity.hexadecimal.html
+ captures:
+ 1: punctuation.definition.entity.html
+ 3: punctuation.definition.entity.html
+ - match: ()([0-9]+)(;)
+ scope: constant.character.entity.decimal.html
+ captures:
+ 1: punctuation.definition.entity.html
+ 3: punctuation.definition.entity.html
+ - match: (&)([a-zA-Z0-9]+)(;)
+ scope: constant.character.entity.named.html
+ captures:
+ 1: punctuation.definition.entity.html
+ 3: punctuation.definition.entity.html
+
+ style-css:
+ - meta_content_scope: meta.tag.style.begin.html
+ - include: style-common
+ - match: '>'
+ scope: punctuation.definition.tag.end.html
+ set:
+ - include: style-close-tag
+ - match: ''
+ embed: scope:source.css
+ embed_scope: source.css.embedded.html
+ escape: (?i)(?=(?:-->\s*)?'
+ scope: punctuation.definition.tag.end.html
+ set:
+ - include: style-close-tag
+
+ style-close-tag:
+ - match: (?i)()(style)(>)
+ scope: meta.tag.style.end.html
+ captures:
+ 1: punctuation.definition.tag.begin.html
+ 2: entity.name.tag.style.html
+ 3: punctuation.definition.tag.end.html
+ pop: true
+
+ style-common:
+ - include: style-type-attribute
+ - include: tag-attributes
+ - match: '/>'
+ scope: punctuation.definition.tag.end.html
+ pop: true
+
+ style-type-attribute:
+ - match: (?i)\btype\b
+ scope: meta.attribute-with-value.html entity.other.attribute-name.html
+ set:
+ - meta_content_scope: meta.tag.style.begin.html meta.attribute-with-value.html
+ - match: =
+ scope: punctuation.separator.key-value.html
+ set:
+ - meta_content_scope: meta.tag.style.begin.html meta.attribute-with-value.html
+ - include: style-type-decider
+ - match: (?=\S)
+ set: style-css
+
+ style-type-decider:
+ - match: (?i)(?=text/css(?!{{unquoted_attribute_value}})|'text/css'|"text/css")
+ set:
+ - style-css
+ - tag-generic-attribute-meta
+ - tag-generic-attribute-value
+ - match: (?i)(?=>|''|"")
+ set:
+ - style-css
+ - tag-generic-attribute-meta
+ - tag-generic-attribute-value
+ - match: (?=\S)
+ set:
+ - style-other
+ - tag-generic-attribute-meta
+ - tag-generic-attribute-value
+
+ script-javascript:
+ - meta_content_scope: meta.tag.script.begin.html
+ - include: script-common
+ - match: '>'
+ scope: punctuation.definition.tag.end.html
+ set:
+ - include: script-close-tag
+ - match: (?=\S)
+ embed: scope:source.js
+ embed_scope: source.js.embedded.html
+ escape: (?i)(?=(?:-->\s*)?'
+ scope: punctuation.definition.tag.end.html
+ set:
+ - meta_content_scope: text.html.embedded.html
+ - include: script-close-tag
+ - include: main
+
+ script-other:
+ - meta_content_scope: meta.tag.script.begin.html
+ - include: script-common
+ - match: '>'
+ scope: punctuation.definition.tag.end.html
+ set:
+ - include: script-close-tag
+
+ script-close-tag:
+ - match: \s*()\s*)?()(script)(>)
+ scope: meta.tag.script.end.html
+ captures:
+ 1: comment.block.html punctuation.definition.comment.end.html
+ 2: punctuation.definition.tag.begin.html
+ 3: entity.name.tag.script.html
+ 4: punctuation.definition.tag.end.html
+ pop: true
+
+ script-common:
+ - include: script-type-attribute
+ - include: tag-attributes
+ - match: '/>'
+ scope: punctuation.definition.tag.end.html
+ pop: true
+
+ script-type-attribute:
+ - match: (?i)\btype\b
+ scope: meta.attribute-with-value.html entity.other.attribute-name.html
+ set:
+ - meta_content_scope: meta.tag.script.begin.html meta.attribute-with-value.html
+ - match: =
+ scope: punctuation.separator.key-value.html
+ set:
+ - meta_content_scope: meta.tag.script.begin.html meta.attribute-with-value.html
+ - include: script-type-decider
+ - match: (?=\S)
+ set: script-javascript
+
+ script-type-decider:
+ - match: (?i)(?={{javascript_mime_type}}(?!{{unquoted_attribute_value}})|'{{javascript_mime_type}}'|"{{javascript_mime_type}}")
+ set:
+ - script-javascript
+ - tag-generic-attribute-meta
+ - tag-generic-attribute-value
+ - match: (?i)(?=module(?!{{unquoted_attribute_value}})|'module'|"module")
+ set:
+ - script-javascript
+ - tag-generic-attribute-meta
+ - tag-generic-attribute-value
+ - match: (?i)(?=>|''|"")
+ set:
+ - script-javascript
+ - tag-generic-attribute-meta
+ - tag-generic-attribute-value
+ - match: (?i)(?=text/html(?!{{unquoted_attribute_value}})|'text/html'|"text/html")
+ set:
+ - script-html
+ - tag-generic-attribute-meta
+ - tag-generic-attribute-value
+ - match: (?=\S)
+ set:
+ - script-other
+ - tag-generic-attribute-meta
+ - tag-generic-attribute-value
+
+ string-double-quoted:
+ - match: '"'
+ scope: punctuation.definition.string.begin.html
+ push:
+ - meta_scope: string.quoted.double.html
+ - match: '"'
+ scope: punctuation.definition.string.end.html
+ pop: true
+ - include: entities
+ string-single-quoted:
+ - match: "'"
+ scope: punctuation.definition.string.begin.html
+ push:
+ - meta_scope: string.quoted.single.html
+ - match: "'"
+ scope: punctuation.definition.string.end.html
+ pop: true
+ - include: entities
+
+ tag-generic-attribute:
+ - match: (?={{attribute_char}})
+ scope: entity.other.attribute-name.html
+ push:
+ - tag-generic-attribute-meta
+ - tag-generic-attribute-equals
+ - generic-attribute-name
+
+ generic-attribute-name:
+ - meta_scope: entity.other.attribute-name.html
+ - match: (?!{{attribute_char}})
+ pop: true
+
+ tag-generic-attribute-meta:
+ - meta_scope: meta.attribute-with-value.html
+ - include: immediately-pop
+
+ tag-generic-attribute-equals:
+ - match: '='
+ scope: punctuation.separator.key-value.html
+ set: tag-generic-attribute-value
+ - match: '{{not_equals_lookahead}}'
+ pop: true
+
+ tag-generic-attribute-value:
+ - match: '"'
+ scope: punctuation.definition.string.begin.html
+ set:
+ - meta_scope: string.quoted.double.html
+ - match: '"'
+ scope: punctuation.definition.string.end.html
+ pop: true
+ - include: entities
+ - match: "'"
+ scope: punctuation.definition.string.begin.html
+ set:
+ - meta_scope: string.quoted.single.html
+ - match: "'"
+ scope: punctuation.definition.string.end.html
+ pop: true
+ - include: entities
+ - match: '{{unquoted_attribute_value}}'
+ scope: string.unquoted.html
+ pop: true
+ - include: else-pop
+
+ tag-class-attribute:
+ - match: '\bclass\b'
+ scope: entity.other.attribute-name.class.html
+ push:
+ - tag-class-attribute-meta
+ - tag-class-attribute-equals
+
+ tag-class-attribute-meta:
+ - meta_scope: meta.attribute-with-value.class.html
+ - include: immediately-pop
+
+ tag-class-attribute-equals:
+ - match: '='
+ scope: punctuation.separator.key-value.html
+ set: tag-class-attribute-value
+ - match: '{{not_equals_lookahead}}'
+ pop: true
+
+ tag-class-attribute-value:
+ - match: '"'
+ scope: punctuation.definition.string.begin.html
+ set:
+ - meta_scope: string.quoted.double.html
+ - meta_content_scope: meta.class-name.html
+ - match: '"'
+ scope: punctuation.definition.string.end.html
+ pop: true
+ - include: entities
+ - match: "'"
+ scope: punctuation.definition.string.begin.html
+ set:
+ - meta_scope: string.quoted.single.html
+ - meta_content_scope: meta.class-name.html
+ - match: "'"
+ scope: punctuation.definition.string.end.html
+ pop: true
+ - include: entities
+ - match: '{{unquoted_attribute_value}}'
+ scope: string.unquoted.html meta.class-name.html
+ pop: true
+ - include: else-pop
+
+ tag-id-attribute:
+ - match: '\bid\b'
+ scope: entity.other.attribute-name.id.html
+ push:
+ - tag-id-attribute-meta
+ - tag-id-attribute-equals
+
+ tag-id-attribute-meta:
+ - meta_scope: meta.attribute-with-value.id.html
+ - include: immediately-pop
+
+ tag-id-attribute-equals:
+ - match: '='
+ scope: punctuation.separator.key-value.html
+ set: tag-id-attribute-value
+ - match: '{{not_equals_lookahead}}'
+ pop: true
+
+ tag-id-attribute-value:
+ - match: '"'
+ scope: punctuation.definition.string.begin.html
+ set:
+ - meta_scope: string.quoted.double.html
+ - meta_content_scope: meta.toc-list.id.html
+ - match: '"'
+ scope: punctuation.definition.string.end.html
+ pop: true
+ - include: entities
+ - match: "'"
+ scope: punctuation.definition.string.begin.html
+ set:
+ - meta_scope: string.quoted.single.html
+ - meta_content_scope: meta.toc-list.id.html
+ - match: "'"
+ scope: punctuation.definition.string.end.html
+ pop: true
+ - include: entities
+ - match: '{{unquoted_attribute_value}}'
+ scope: string.unquoted.html meta.toc-list.id.html
+ pop: true
+ - include: else-pop
+
+ tag-style-attribute:
+ - match: '\bstyle\b'
+ scope: entity.other.attribute-name.style.html
+ push:
+ - tag-style-attribute-meta
+ - tag-style-attribute-equals
+
+ tag-style-attribute-meta:
+ - meta_scope: meta.attribute-with-value.style.html
+ - include: immediately-pop
+
+ tag-style-attribute-equals:
+ - match: '='
+ scope: punctuation.separator.key-value.html
+ set: tag-style-attribute-value
+ - match: '{{not_equals_lookahead}}'
+ pop: true
+
+ tag-style-attribute-value:
+ - match: '"'
+ scope: string.quoted.double punctuation.definition.string.begin.html
+ embed: scope:source.css#rule-list-body
+ embed_scope: source.css
+ escape: '"'
+ escape_captures:
+ 0: string.quoted.double punctuation.definition.string.end.html
+ - match: "'"
+ scope: string.quoted.single punctuation.definition.string.begin.html
+ embed: scope:source.css#rule-list-body
+ embed_scope: source.css
+ escape: "'"
+ escape_captures:
+ 0: string.quoted.single punctuation.definition.string.end.html
+ - include: else-pop
+
+ tag-event-attribute:
+ - match: |-
+ (?x)\bon(
+ abort|autocomplete|autocompleteerror|auxclick|blur|cancel|canplay
+ |canplaythrough|change|click|close|contextmenu|cuechange|dblclick|drag
+ |dragend|dragenter|dragexit|dragleave|dragover|dragstart|drop
+ |durationchange|emptied|ended|error|focus|input|invalid|keydown
+ |keypress|keyup|load|loadeddata|loadedmetadata|loadstart|mousedown
+ |mouseenter|mouseleave|mousemove|mouseout|mouseover|mouseup|mousewheel
+ |pause|play|playing|progress|ratechange|reset|resize|scroll|seeked
+ |seeking|select|show|sort|stalled|submit|suspend|timeupdate|toggle
+ |volumechange|waiting
+ )\b
+ scope: entity.other.attribute-name.event.html
+ push:
+ - tag-event-attribute-meta
+ - tag-event-attribute-equals
+
+ tag-event-attribute-meta:
+ - meta_scope: meta.attribute-with-value.event.html
+ - include: immediately-pop
+
+ tag-event-attribute-equals:
+ - match: '='
+ scope: punctuation.separator.key-value.html
+ set: tag-event-attribute-value
+ - match: '{{not_equals_lookahead}}'
+ pop: true
+
+ tag-event-attribute-value:
+ - match: '"'
+ scope: string.quoted.double punctuation.definition.string.begin.html
+ embed: scope:source.js
+ embed_scope: meta.attribute-with-value.event.html
+ escape: '"'
+ escape_captures:
+ 0: string.quoted.double punctuation.definition.string.end.html
+ - match: "'"
+ scope: string.quoted.single punctuation.definition.string.begin.html meta.attribute-with-value.event.html
+ embed: scope:source.js
+ embed_scope: meta.attribute-with-value.event.html
+ escape: "'"
+ escape_captures:
+ 0: string.quoted.single punctuation.definition.string.end.html
+ - include: else-pop
+
+ # This is to prevent breaking syntaxes referencing the old context name
+ tag-stuff:
+ - include: tag-attributes
+
+ tag-attributes:
+ - include: tag-id-attribute
+ - include: tag-class-attribute
+ - include: tag-style-attribute
+ - include: tag-event-attribute
+ - include: tag-generic-attribute
diff --git a/README.md b/README.md
index e49c74e..efde56a 100644
--- a/README.md
+++ b/README.md
@@ -1,19 +1,36 @@
# Vue Syntax Highlight
+**Note**: the `st4` branch hosts the new syntax that only works in Sublime build > 4107.
+
+* For Sublime Text 2 support (`.tmlanguage` files), see `master` branch.
+* For Sublime Text 3 support, see `new` branch.
+
Sublime Text Syntax highlighting for single-file [Vue.js](http://vuejs.org) components (enabled by [vue-loader](https://github.com/vuejs/vue-loader) or [vueify](https://github.com/vuejs/vueify)).
-
+
+
+
### Install
- Via Package Control: search for `Vue Syntax Highlight`.
- Manual: clone this repo into your Sublime `Packages` folder.
-**NOTE:** You still need to install corresponding packages for pre-processors (e.g. Jade, SASS, CoffeeScript) to get proper syntax highlighting for them.
+**NOTE:** You still need to install corresponding packages for pre-processors (e.g. Pug, SASS, CoffeeScript) to get proper syntax highlighting for them.
### Enabling JSX Highlighting
-The `'
+ scope: punctuation.definition.tag.end.html
+ set:
+ - meta_content_scope: text.html.embedded.html
+ - include: script-close-tag
+ - include: main
+
+ script-other:
+ - meta_content_scope: meta.tag.script.begin.html
+ - include: script-common
+ - match: '>'
+ scope: punctuation.definition.tag.end.html
+ set:
+ - include: script-close-tag
+
+ script-close-tag:
+ - match: \s*()\s*)?()(script)(>)
+ scope: meta.tag.script.end.html
+ captures:
+ 1: comment.block.html punctuation.definition.comment.end.html
+ 2: punctuation.definition.tag.begin.html
+ 3: entity.name.tag.script.html
+ 4: punctuation.definition.tag.end.html
+ pop: true
+
+ script-common:
+ - include: script-lang-attribute
+
+ - include: script-type-attribute
+ - include: tag-attributes
+ - match: />
+ scope: punctuation.definition.tag.end.html
+ pop: true
+
+ script-type-attribute:
+ - match: (?i)\btype\b
+ scope: meta.attribute-with-value.html entity.other.attribute-name.html
+ set:
+ - meta_content_scope: meta.tag.script.begin.html meta.attribute-with-value.html
+ - match: =
+ scope: punctuation.separator.key-value.html
+ set:
+ - meta_content_scope: meta.tag.script.begin.html meta.attribute-with-value.html
+ - include: script-type-decider
+ - match: (?=\S)
+ set: script-javascript
+
+ script-type-decider:
+ - match: (?i)(?={{javascript_mime_type}}(?!{{unquoted_attribute_value}})|'{{javascript_mime_type}}'|"{{javascript_mime_type}}")
+ set:
+ - script-javascript
+ - tag-generic-attribute-meta
+ - tag-generic-attribute-value
+ - match: (?i)(?=module(?!{{unquoted_attribute_value}})|'module'|"module")
+ set:
+ - script-javascript
+ - tag-generic-attribute-meta
+ - tag-generic-attribute-value
+ - match: (?i)(?=>|''|"")
+ set:
+ - script-javascript
+ - tag-generic-attribute-meta
+ - tag-generic-attribute-value
+ - match: (?i)(?=text/html(?!{{unquoted_attribute_value}})|'text/html'|"text/html")
+ set:
+ - script-html
+ - tag-generic-attribute-meta
+ - tag-generic-attribute-value
+ - match: (?=\S)
+ set:
+ - script-other
+ - tag-generic-attribute-meta
+ - tag-generic-attribute-value
+
+ string-double-quoted:
+ - match: '"'
+ scope: punctuation.definition.string.begin.html
+ push:
+ - meta_scope: string.quoted.double.html
+ - match: '"'
+ scope: punctuation.definition.string.end.html
+ pop: true
+ - include: entities
+ string-single-quoted:
+ - match: "'"
+ scope: punctuation.definition.string.begin.html
+ push:
+ - meta_scope: string.quoted.single.html
+ - match: "'"
+ scope: punctuation.definition.string.end.html
+ pop: true
+ - include: entities
+
+ tag-generic-attribute:
+ - match: (?={{attribute_char}})
+ scope: entity.other.attribute-name.html
+ push:
+ - tag-generic-attribute-meta
+ - tag-generic-attribute-equals
+ - generic-attribute-name
+
+ generic-attribute-name:
+ - meta_scope: entity.other.attribute-name.html
+ - match: (?!{{attribute_char}})
+ pop: true
+
+ tag-generic-attribute-meta:
+ - meta_scope: meta.attribute-with-value.html
+ - include: immediately-pop
+
+ tag-generic-attribute-equals:
+ - match: '='
+ scope: punctuation.separator.key-value.html
+ set: tag-generic-attribute-value
+ - match: '{{not_equals_lookahead}}'
+ pop: true
+
+ tag-generic-attribute-value:
+ - match: '"'
+ scope: punctuation.definition.string.begin.html
+ set:
+ - meta_scope: string.quoted.double.html
+ - match: '"'
+ scope: punctuation.definition.string.end.html
+ pop: true
+ - include: entities
+ - match: "'"
+ scope: punctuation.definition.string.begin.html
+ set:
+ - meta_scope: string.quoted.single.html
+ - match: "'"
+ scope: punctuation.definition.string.end.html
+ pop: true
+ - include: entities
+ - match: '{{unquoted_attribute_value}}'
+ scope: string.unquoted.html
+ pop: true
+ - include: else-pop
+
+ tag-class-attribute:
+ - match: \bclass\b
+ scope: entity.other.attribute-name.class.html
+ push:
+ - tag-class-attribute-meta
+ - tag-class-attribute-equals
+
+ tag-class-attribute-meta:
+ - meta_scope: meta.attribute-with-value.class.html
+ - include: immediately-pop
+
+ tag-class-attribute-equals:
+ - match: '='
+ scope: punctuation.separator.key-value.html
+ set: tag-class-attribute-value
+ - match: '{{not_equals_lookahead}}'
+ pop: true
+
+ tag-class-attribute-value:
+ - match: '"'
+ scope: punctuation.definition.string.begin.html
+ set:
+ - meta_scope: string.quoted.double.html
+ - meta_content_scope: meta.class-name.html
+ - match: '"'
+ scope: punctuation.definition.string.end.html
+ pop: true
+ - include: entities
+ - match: "'"
+ scope: punctuation.definition.string.begin.html
+ set:
+ - meta_scope: string.quoted.single.html
+ - meta_content_scope: meta.class-name.html
+ - match: "'"
+ scope: punctuation.definition.string.end.html
+ pop: true
+ - include: entities
+ - match: '{{unquoted_attribute_value}}'
+ scope: string.unquoted.html meta.class-name.html
+ pop: true
+ - include: else-pop
+
+ tag-id-attribute:
+ - match: \bid\b
+ scope: entity.other.attribute-name.id.html
+ push:
+ - tag-id-attribute-meta
+ - tag-id-attribute-equals
+
+ tag-id-attribute-meta:
+ - meta_scope: meta.attribute-with-value.id.html
+ - include: immediately-pop
+
+ tag-id-attribute-equals:
+ - match: '='
+ scope: punctuation.separator.key-value.html
+ set: tag-id-attribute-value
+ - match: '{{not_equals_lookahead}}'
+ pop: true
+
+ tag-id-attribute-value:
+ - match: '"'
+ scope: punctuation.definition.string.begin.html
+ set:
+ - meta_scope: string.quoted.double.html
+ - meta_content_scope: meta.toc-list.id.html
+ - match: '"'
+ scope: punctuation.definition.string.end.html
+ pop: true
+ - include: entities
+ - match: "'"
+ scope: punctuation.definition.string.begin.html
+ set:
+ - meta_scope: string.quoted.single.html
+ - meta_content_scope: meta.toc-list.id.html
+ - match: "'"
+ scope: punctuation.definition.string.end.html
+ pop: true
+ - include: entities
+ - match: '{{unquoted_attribute_value}}'
+ scope: string.unquoted.html meta.toc-list.id.html
+ pop: true
+ - include: else-pop
+
+ tag-style-attribute:
+ - match: \bstyle\b
+ scope: entity.other.attribute-name.style.html
+ push:
+ - tag-style-attribute-meta
+ - tag-style-attribute-equals
+
+ tag-style-attribute-meta:
+ - meta_scope: meta.attribute-with-value.style.html
+ - include: immediately-pop
+
+ tag-style-attribute-equals:
+ - match: '='
+ scope: punctuation.separator.key-value.html
+ set: tag-style-attribute-value
+ - match: '{{not_equals_lookahead}}'
+ pop: true
+
+ tag-style-attribute-value:
+ - match: '"'
+ scope: string.quoted.double punctuation.definition.string.begin.html
+ embed: scope:source.css#rule-list-body
+ embed_scope: source.css
+ escape: '"'
+ escape_captures:
+ 0: string.quoted.double punctuation.definition.string.end.html
+ - match: "'"
+ scope: string.quoted.single punctuation.definition.string.begin.html
+ embed: scope:source.css#rule-list-body
+ embed_scope: source.css
+ escape: "'"
+ escape_captures:
+ 0: string.quoted.single punctuation.definition.string.end.html
+ - include: else-pop
+
+ tag-event-attribute:
+ - match: |-
+ (?x)\bon(
+ abort|autocomplete|autocompleteerror|auxclick|blur|cancel|canplay
+ |canplaythrough|change|click|close|contextmenu|cuechange|dblclick|drag
+ |dragend|dragenter|dragexit|dragleave|dragover|dragstart|drop
+ |durationchange|emptied|ended|error|focus|input|invalid|keydown
+ |keypress|keyup|load|loadeddata|loadedmetadata|loadstart|mousedown
+ |mouseenter|mouseleave|mousemove|mouseout|mouseover|mouseup|mousewheel
+ |pause|play|playing|progress|ratechange|reset|resize|scroll|seeked
+ |seeking|select|show|sort|stalled|submit|suspend|timeupdate|toggle
+ |volumechange|waiting
+ )\b
+ scope: entity.other.attribute-name.event.html
+ push:
+ - tag-event-attribute-meta
+ - tag-event-attribute-equals
+
+ tag-event-attribute-meta:
+ - meta_scope: meta.attribute-with-value.event.html
+ - include: immediately-pop
+
+ tag-event-attribute-equals:
+ - match: '='
+ scope: punctuation.separator.key-value.html
+ set: tag-event-attribute-value
+ - match: '{{not_equals_lookahead}}'
+ pop: true
+
+ tag-event-attribute-value:
+ - match: '"'
+ scope: string.quoted.double punctuation.definition.string.begin.html
+ embed: scope:source.js
+ embed_scope: meta.attribute-with-value.event.html
+ escape: '"'
+ escape_captures:
+ 0: string.quoted.double punctuation.definition.string.end.html
+ - match: "'"
+ scope: string.quoted.single punctuation.definition.string.begin.html meta.attribute-with-value.event.html
+ embed: scope:source.js
+ embed_scope: meta.attribute-with-value.event.html
+ escape: "'"
+ escape_captures:
+ 0: string.quoted.single punctuation.definition.string.end.html
+ - include: else-pop
+
+ # This is to prevent breaking syntaxes referencing the old context name
+ tag-stuff:
+ - include: tag-attributes
+
+ tag-attributes:
+ - include: vue-directive
+
+ - include: tag-id-attribute
+ - include: tag-class-attribute
+ - include: tag-style-attribute
+ - include: tag-event-attribute
+ - include: tag-generic-attribute
+ mustache-expression:
+ - match: (?={{)
+ set:
+ - meta_scope: meta.template.vue
+ - match: '{{'
+ scope: punctuation.definition.template.begin.html
+ embed: scope:source.js
+ embed_scope: source.js.embedded.vue
+ escape: '}}'
+ escape_captures:
+ 0: meta.template.vue punctuation.definition.template.end.html
+ - match: ''
+ pop: true
+
+ template-tag:
+ - match: (<)((?i:template(>| )))\b
+ captures:
+ 0: meta.tag.template.begin.html
+ 1: punctuation.definition.tag.begin.html
+ 2: entity.name.tag.template.html
+ push: template-mustache
+
+ vue-directive:
+ - match: \b(v-[\w\:\.-]+)\b
+ scope: entity.other.attribute-name.html
+ push: js-attribute-value
+ - match: \B(:|@)([\w\.-]+)\b
+ captures:
+ 1: punctuation.definition.attribute.html
+ 2: entity.other.attribute-name.html
+ push: js-attribute-value
+
+ js-attribute-value:
+ - match: '='
+ scope: punctuation.separator.key-value.html
+ set: js-string
+ - include: else-pop
+
+ js-string:
+ - match: '"'
+ scope: punctuation.definition.string.begin.html
+ embed: scope:source.js
+ embed_scope: source.js.embedded.vue
+ escape: '"'
+ escape_captures:
+ 0: punctuation.definition.string.end.html
+ - match: "'"
+ scope: punctuation.definition.string.begin.html
+ embed: scope:source.js
+ embed_scope: source.js.embedded.vue
+ escape: "'"
+ escape_captures:
+ 0: punctuation.definition.string.end.html
+
+ - include: else-pop
+
+ style-lang-attribute:
+ - match: (?i)\blang\b
+ scope: meta.attribute-with-value.html entity.other.attribute-name.html
+ set:
+ - meta_content_scope: meta.tag.style.begin.html meta.attribute-with-value.html
+ - match: =
+ scope: punctuation.separator.key-value.html
+ set:
+ - meta_content_scope: meta.tag.style.begin.html meta.attribute-with-value.html
+ - include: style-lang-decider
+ - match: (?=\S)
+ set: style-css
+
+ style-lang-decider:
+ - match: (?i)(?=sass(?!{{unquoted_attribute_value}})|\'sass\'|"sass")
+ set:
+ - - meta_content_scope: meta.tag.style.begin.html
+ - include: style-common
+ - match: '>'
+ scope: punctuation.definition.tag.end.html
+ set:
+ - include: style-close-tag
+ - embed_scope: source.sass.embedded.html
+ match: ''
+ embed: scope:source.sass
+ escape: (?i)(?=(?:-->\s*)?'
+ scope: punctuation.definition.tag.end.html
+ set:
+ - include: style-close-tag
+ - embed_scope: source.scss.embedded.html
+ match: ''
+ embed: scope:source.scss
+ escape: (?i)(?=(?:-->\s*)?'
+ scope: punctuation.definition.tag.end.html
+ set:
+ - include: style-close-tag
+ - embed_scope: source.stylus.embedded.html
+ match: ''
+ embed: scope:source.stylus
+ escape: (?i)(?=(?:-->\s*)?'
+ scope: punctuation.definition.tag.end.html
+ set:
+ - include: style-close-tag
+ - embed_scope: source.sss.embedded.html
+ match: ''
+ embed: scope:source.sss
+ escape: (?i)(?=(?:-->\s*)?'
+ scope: punctuation.definition.tag.end.html
+ set:
+ - include: style-close-tag
+ - embed_scope: source.postcss.embedded.html
+ match: ''
+ embed: scope:source.postcss
+ escape: (?i)(?=(?:-->\s*)?'
+ scope: punctuation.definition.tag.end.html
+ set:
+ - include: style-close-tag
+ - embed_scope: source.less.embedded.html
+ match: ''
+ embed: scope:source.less
+ escape: (?i)(?=(?:-->\s*)?'
+ scope: punctuation.definition.tag.end.html
+ set:
+ - include: script-close-tag
+ - embed_scope: source.coffee.embedded.html
+ match: ''
+ embed: scope:source.coffee
+ escape: (?i)(?=(?:-->\s*)?'
+ scope: punctuation.definition.tag.end.html
+ set:
+ - include: script-close-tag
+ - embed_scope: source.livescript.embedded.html
+ match: ''
+ embed: scope:source.livescript
+ escape: (?i)(?=(?:-->\s*)?'
+ scope: punctuation.definition.tag.end.html
+ set:
+ - include: script-close-tag
+ - embed_scope: source.ts.embedded.html
+ match: ''
+ embed: scope:source.ts
+ escape: (?i)(?=(?:-->\s*)?
+ scope: punctuation.definition.tag.end.html
+ pop: true
+
+ template-close-tag:
+ - match: (?i)()(template)(>)
+ scope: meta.tag.template.end.html
+ captures:
+ 1: punctuation.definition.tag.begin.html
+ 2: entity.name.tag.template.html
+ 3: punctuation.definition.tag.end.html
+ pop: true
+
+ template-mustache:
+ - meta_content_scope: meta.tag.template.begin.html
+ - include: template-common
+ - match: '>'
+ scope: punctuation.definition.tag.end.html
+ set:
+ - include: template-close-tag
+ - match: ''
+ push: main
+
+ template-lang-attribute:
+ - match: (?i)\blang\b
+ scope: meta.attribute-with-value.html entity.other.attribute-name.html
+ set:
+ - meta_content_scope: meta.tag.template.begin.html meta.attribute-with-value.html
+ - match: =
+ scope: punctuation.separator.key-value.html
+ set:
+ - meta_content_scope: meta.tag.template.begin.html meta.attribute-with-value.html
+ - include: template-lang-decider
+ - match: (?=\S)
+ set: template-mustache
+
+ template-lang-decider:
+ - match: (?i)(?=jade(?!{{unquoted_attribute_value}})|\'jade\'|"jade")
+ set:
+ - - meta_content_scope: meta.tag.template.begin.html
+ - include: template-common
+ - match: '>'
+ scope: punctuation.definition.tag.end.html
+ set:
+ - include: template-close-tag
+ - embed_scope: text.jade.embedded.html
+ match: ''
+ embed: scope:text.jade
+ escape: (?i)(?=(?:-->\s*)?'
+ scope: punctuation.definition.tag.end.html
+ set:
+ - include: template-close-tag
+ - embed_scope: text.pug.embedded.html
+ match: ''
+ embed: scope:text.pug
+ escape: (?i)(?=(?:-->\s*)?'
+ scope: punctuation.definition.tag.end.html
+ set:
+ - include: template-close-tag
+ - embed_scope: text.slm.embedded.html
+ match: ''
+ embed: scope:text.slm
+ escape: (?i)(?=(?:-->\s*)?| )))\b
+ captures:
+ 0: meta.tag.template.begin.html
+ 1: punctuation.definition.tag.begin.html
+ 2: entity.name.tag.template.html
+ push: template-mustache
+
+ vue-directive:
+ - match: \b(v-[\w\:\.-]+)\b
+ scope: entity.other.attribute-name.html
+ push: js-attribute-value
+ - match: \B(:|@)([\w\.-]+)\b
+ captures:
+ 1: punctuation.definition.attribute.html
+ 2: entity.other.attribute-name.html
+ push: js-attribute-value
+
+ js-attribute-value:
+ - match: '='
+ scope: punctuation.separator.key-value.html
+ set: js-string
+ - include: else-pop
+
+ js-string:
+ - match: '"'
+ scope: punctuation.definition.string.begin.html
+ embed: scope:source.js
+ embed_scope: source.js.embedded.vue
+ escape: '"'
+ escape_captures:
+ 0: punctuation.definition.string.end.html
+ - match: "'"
+ scope: punctuation.definition.string.begin.html
+ embed: scope:source.js
+ embed_scope: source.js.embedded.vue
+ escape: "'"
+ escape_captures:
+ 0: punctuation.definition.string.end.html
+
+ - include: else-pop
+
+ style-common: !prepend
+ - include: style-lang-attribute
+
+ style-lang-attribute:
+ - match: (?i)\blang\b
+ scope: meta.attribute-with-value.html entity.other.attribute-name.html
+ set:
+ - meta_content_scope: meta.tag.style.begin.html meta.attribute-with-value.html
+ - match: =
+ scope: punctuation.separator.key-value.html
+ set:
+ - meta_content_scope: meta.tag.style.begin.html meta.attribute-with-value.html
+ - include: style-lang-decider
+ - match: (?=\S)
+ set: style-css
+
+ style-lang-decider:
+ - !style_language [ sass, source.sass ]
+ - !style_language [ scss, source.scss ]
+ - !style_language [ stylus, source.stylus ]
+ - !style_language [ postcss\?parser=sugarss, source.sss ]
+ - !style_language [ postcss, source.postcss ]
+ - !style_language [ less, source.less ]
+ - match: (?=\S)
+ set:
+ - style-css
+ - tag-generic-attribute-meta
+ - tag-generic-attribute-value
+
+ script-common: !prepend
+ - include: script-lang-attribute
+
+ script-lang-attribute:
+ - match: (?i)\blang\b
+ scope: meta.attribute-with-value.html entity.other.attribute-name.html
+ set:
+ - meta_content_scope: meta.tag.script.begin.html meta.attribute-with-value.html
+ - match: =
+ scope: punctuation.separator.key-value.html
+ set:
+ - meta_content_scope: meta.tag.script.begin.html meta.attribute-with-value.html
+ - include: script-lang-decider
+ - match: (?=\S)
+ set: script-javascript
+
+ script-lang-decider:
+ - !script_language [ coffee, source.coffee ]
+ - !script_language [ livescript, source.livescript ]
+ - !script_language [ ts, source.ts ]
+ - match: (?=\S)
+ set:
+ - script-javascript
+ - tag-generic-attribute-meta
+ - tag-generic-attribute-value
+
+ template-common:
+ - include: template-lang-attribute
+ - include: tag-attributes
+ - match: '/>'
+ scope: punctuation.definition.tag.end.html
+ pop: true
+
+ template-close-tag:
+ - match: (?i)()(template)(>)
+ scope: meta.tag.template.end.html
+ captures:
+ 1: punctuation.definition.tag.begin.html
+ 2: entity.name.tag.template.html
+ 3: punctuation.definition.tag.end.html
+ pop: true
+
+ template-mustache:
+ - meta_content_scope: meta.tag.template.begin.html
+ - include: template-common
+ - match: '>'
+ scope: punctuation.definition.tag.end.html
+ set:
+ - include: template-close-tag
+ - match: ''
+ push: main
+
+ template-lang-attribute:
+ - match: (?i)\blang\b
+ scope: meta.attribute-with-value.html entity.other.attribute-name.html
+ set:
+ - meta_content_scope: meta.tag.template.begin.html meta.attribute-with-value.html
+ - match: =
+ scope: punctuation.separator.key-value.html
+ set:
+ - meta_content_scope: meta.tag.template.begin.html meta.attribute-with-value.html
+ - include: template-lang-decider
+ - match: (?=\S)
+ set: template-mustache
+
+ template-lang-decider:
+ - !template_language [ jade, text.jade ]
+ - !template_language [ pug, text.pug ]
+ - !template_language [ slm, text.slm ]
+ - match: (?=\S)
+ set:
+ - template-mustache
+ - tag-generic-attribute-meta
+ - tag-generic-attribute-value
diff --git a/samples/arrow.vue b/samples/arrow.vue
index 29d0a6b..4ff74cb 100644
--- a/samples/arrow.vue
+++ b/samples/arrow.vue
@@ -1,6 +1,5 @@
diff --git a/samples/basic.vue b/samples/basic.vue
index d192aa0..3c7d521 100644
--- a/samples/basic.vue
+++ b/samples/basic.vue
@@ -12,7 +12,8 @@ Things to verify:
+ @click="onClick('hello')"
+ @click.prevent="onClick('hello')">
Hello
diff --git a/samples/jsx.vue b/samples/jsx.vue
new file mode 100644
index 0000000..6a17d73
--- /dev/null
+++ b/samples/jsx.vue
@@ -0,0 +1,9 @@
+
+
+
diff --git a/samples/langs.vue b/samples/langs.vue
index bb6d2bc..ebfbb52 100644
--- a/samples/langs.vue
+++ b/samples/langs.vue
@@ -14,6 +14,20 @@ body
color primary-color
+
+
+
+
div.app
h1.title This is the app
diff --git a/samples/screenshot.png b/samples/screenshot.png
new file mode 100644
index 0000000..a86bcde
Binary files /dev/null and b/samples/screenshot.png differ
diff --git a/src/macros.py b/src/macros.py
new file mode 100644
index 0000000..f8a290f
--- /dev/null
+++ b/src/macros.py
@@ -0,0 +1,37 @@
+from YAMLMacros.lib.syntax import rule as _rule
+from YAMLMacros.lib.extend import *
+
+def script_language(match, embed):
+ return embed_language_in_tag('script', match, embed)
+
+def style_language(match, embed):
+ return embed_language_in_tag('style', match, embed)
+
+def template_language(match, embed):
+ return embed_language_in_tag('template', match, embed)
+
+def embed_language_in_tag(tag, match, embed):
+ return _rule(
+ match=r'(?i)(?={0}(?!{{{{unquoted_attribute_value}}}})|\'{0}\'|"{0}")'.format(match),
+ set=[
+ [
+ _rule(meta_content_scope='meta.tag.%s.begin.html' % tag),
+ _rule(include='%s-common' % tag),
+ _rule(
+ match='>',
+ scope='punctuation.definition.tag.end.html',
+ set=[
+ _rule(include='%s-close-tag' % tag),
+ _rule(
+ match=r'',
+ embed=('scope:%s' % embed),
+ embed_scope=('%s.embedded.html' % embed),
+ escape=r'(?i)(?=(?:-->\s*)?%s)' % tag,
+ )
+ ]
+ ),
+ ],
+ 'tag-generic-attribute-meta',
+ 'tag-generic-attribute-value',
+ ]
+ )
diff --git a/syntax_test_basic.vue b/syntax_test_basic.vue
new file mode 100644
index 0000000..409652a
--- /dev/null
+++ b/syntax_test_basic.vue
@@ -0,0 +1,34 @@
+
+
+
+ Click Me
+
+
+ Hello {{ world }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/syntax_test_langs.vue b/syntax_test_langs.vue
new file mode 100644
index 0000000..17ac5e9
--- /dev/null
+++ b/syntax_test_langs.vue
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+div.app
+ h1.title This is the app
+ // ^ source.pug
+ comp-a(foo="bar", :a=1)
+ comp-b(bar="baz", :a=234)
+
+
+
diff --git a/vue.YAML-tmLanguage b/vue.YAML-tmLanguage
deleted file mode 100644
index 7582aef..0000000
--- a/vue.YAML-tmLanguage
+++ /dev/null
@@ -1,470 +0,0 @@
-# [PackageDev] target_format: plist, ext: tmLanguage
----
-name: Vue Component
-scopeName: text.html.vue
-fileTypes: [vue]
-uuid: 5512c10d-4cc5-434c-b8fc-53b912f55ab3
-
-patterns:
-- include: '#vue-interpolations'
-
-- name: meta.tag.any.html
- begin: (<)([a-zA-Z0-9:-]++)(?=[^>]*>\2>)
- beginCaptures:
- '1': {name: punctuation.definition.tag.begin.html}
- '2': {name: entity.name.tag.html}
- end: (>)(<)(/)(\2)(>)
- endCaptures:
- '1': {name: punctuation.definition.tag.end.html}
- '2': {name: punctuation.definition.tag.begin.html meta.scope.between-tag-pair.html}
- '3': {name: punctuation.definition.tag.begin.html}
- '4': {name: entity.name.tag.html}
- '5': {name: punctuation.definition.tag.end.html}
- patterns:
- - include: '#tag-stuff'
-
-- name: meta.tag.preprocessor.xml.html
- begin: (<\?)(xml)
- end: (\?>)
- captures:
- '1': {name: punctuation.definition.tag.html}
- '2': {name: entity.name.tag.xml.html}
- patterns:
- - include: '#tag-generic-attribute'
- - include: '#string-double-quoted'
- - include: '#string-single-quoted'
-
-- name: comment.block.html
- begin: )$
- |<\?(?:php)?.*\b(if|for(each)?|while)\b.+:
- |\{\{?(if|foreach|capture|literal|foreach|php|section|strip)
- |\{\s*($|\?>\s*$|//|/\*(.*\*/\s*$|(?!.*?\*/)))
- )
-
-foldingStopMarker: |-
- (?x)
- ((?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|li|form|dl)>
- |^(?!.*?$
- |<\?(?:php)?.*\bend(if|for(each)?|while)\b
- |\{\{?/(if|foreach|capture|literal|foreach|php|section|strip)
- |^[^{]*\}
- )
-
-keyEquivalent: ^~H
diff --git a/vue.tmLanguage b/vue.tmLanguage
deleted file mode 100644
index b8f67f4..0000000
--- a/vue.tmLanguage
+++ /dev/null
@@ -1,1470 +0,0 @@
-
-
-
-
- fileTypes
-
- vue
-
- foldingStartMarker
- (?x)
-(<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|li|form|dl)\b.*?>
-|<!--(?!.*--\s*>)
-|^<!--\ \#tminclude\ (?>.*?-->)$
-|<\?(?:php)?.*\b(if|for(each)?|while)\b.+:
-|\{\{?(if|foreach|capture|literal|foreach|php|section|strip)
-|\{\s*($|\?>\s*$|//|/\*(.*\*/\s*$|(?!.*?\*/)))
-)
- foldingStopMarker
- (?x)
-(</(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|li|form|dl)>
-|^(?!.*?<!--).*?--\s*>
-|^<!--\ end\ tminclude\ -->$
-|<\?(?:php)?.*\bend(if|for(each)?|while)\b
-|\{\{?/(if|foreach|capture|literal|foreach|php|section|strip)
-|^[^{]*\}
-)
- keyEquivalent
- ^~H
- name
- Vue Component
- patterns
-
-
- include
- #vue-interpolations
-
-
- begin
- (<)([a-zA-Z0-9:-]++)(?=[^>]*></\2>)
- beginCaptures
-
- 1
-
- name
- punctuation.definition.tag.begin.html
-
- 2
-
- name
- entity.name.tag.html
-
-
- end
- (>)(<)(/)(\2)(>)
- endCaptures
-
- 1
-
- name
- punctuation.definition.tag.end.html
-
- 2
-
- name
- punctuation.definition.tag.begin.html meta.scope.between-tag-pair.html
-
- 3
-
- name
- punctuation.definition.tag.begin.html
-
- 4
-
- name
- entity.name.tag.html
-
- 5
-
- name
- punctuation.definition.tag.end.html
-
-
- name
- meta.tag.any.html
- patterns
-
-
- include
- #tag-stuff
-
-
-
-
- begin
- (<\?)(xml)
- captures
-
- 1
-
- name
- punctuation.definition.tag.html
-
- 2
-
- name
- entity.name.tag.xml.html
-
-
- end
- (\?>)
- name
- meta.tag.preprocessor.xml.html
- patterns
-
-
- include
- #tag-generic-attribute
-
-
- include
- #string-double-quoted
-
-
- include
- #string-single-quoted
-
-
-
-
- begin
- <!--
- captures
-
- 0
-
- name
- punctuation.definition.comment.html
-
-
- end
- --\s*>
- name
- comment.block.html
- patterns
-
-
- match
- --
- name
- invalid.illegal.bad-comments-or-CDATA.html
-
-
-
-
- begin
- <!
- captures
-
- 0
-
- name
- punctuation.definition.tag.html
-
-
- end
- >
- name
- meta.tag.sgml.html
- patterns
-
-
- begin
- (?i:DOCTYPE)
- captures
-
- 1
-
- name
- entity.name.tag.doctype.html
-
-
- end
- (?=>)
- name
- meta.tag.sgml.doctype.html
- patterns
-
-
- match
- "[^">]*"
- name
- string.quoted.double.doctype.identifiers-and-DTDs.html
-
-
-
-
- begin
- \[CDATA\[
- end
- ]](?=>)
- name
- constant.other.inline-data.html
-
-
- match
- (\s*)(?!--|>)\S(\s*)
- name
- invalid.illegal.bad-comments-or-CDATA.html
-
-
-
-
- begin
- (?:^\s+)?(<)((?i:template))\b(?=[^>]*lang=(['"])slm\1?)
- captures
-
- 1
-
- name
- punctuation.definition.tag.begin.html
-
- 2
-
- name
- entity.name.tag.style.html
-
- 3
-
- name
- punctuation.definition.tag.html
-
-
- end
- (</)((?i:template))(>)(?:\s*\n)?
- name
- text.slm.embedded.html
- patterns
-
-
- include
- #tag-stuff
-
-
- begin
- (>)
- beginCaptures
-
- 1
-
- name
- punctuation.definition.tag.end.html
-
-
- end
- (?=</(?i:template))
- patterns
-
-
- include
- text.slm
-
-
-
-
-
-
- begin
- (?:^\s+)?(<)((?i:template))\b(?=[^>]*lang=(['"])jade\1?)
- captures
-
- 1
-
- name
- punctuation.definition.tag.begin.html
-
- 2
-
- name
- entity.name.tag.style.html
-
- 3
-
- name
- punctuation.definition.tag.html
-
-
- end
- (</)((?i:template))(>)(?:\s*\n)?
- name
- text.jade.embedded.html
- patterns
-
-
- include
- #tag-stuff
-
-
- begin
- (>)
- beginCaptures
-
- 1
-
- name
- punctuation.definition.tag.end.html
-
-
- end
- (?=</(?i:template))
- patterns
-
-
- include
- text.jade
-
-
-
-
-
-
- begin
- (?:^\s+)?(<)((?i:template))\b(?=[^>]*lang=(['"])pug\1?)
- captures
-
- 1
-
- name
- punctuation.definition.tag.begin.html
-
- 2
-
- name
- entity.name.tag.style.html
-
- 3
-
- name
- punctuation.definition.tag.html
-
-
- end
- (</)((?i:template))(>)(?:\s*\n)?
- name
- text.pug.embedded.html
- patterns
-
-
- include
- #tag-stuff
-
-
- begin
- (>)
- beginCaptures
-
- 1
-
- name
- punctuation.definition.tag.end.html
-
-
- end
- (?=</(?i:template))
- patterns
-
-
- include
- text.pug
-
-
-
-
-
-
- begin
- (?:^\s+)?(<)((?i:style))\b(?=[^>]*lang=(['"])stylus\1?)
- captures
-
- 1
-
- name
- punctuation.definition.tag.begin.html
-
- 2
-
- name
- entity.name.tag.style.html
-
- 3
-
- name
- punctuation.definition.tag.html
-
-
- end
- (</)((?i:style))(>)(?:\s*\n)?
- name
- source.stylus.embedded.html
- patterns
-
-
- include
- #tag-stuff
-
-
- begin
- (>)
- beginCaptures
-
- 1
-
- name
- punctuation.definition.tag.end.html
-
-
- end
- (?=</(?i:style))
- patterns
-
-
- include
- source.stylus
-
-
-
-
-
-
- begin
- (?:^\s+)?(<)((?i:style))\b(?=[^>]*lang=(['"])postcss\1?)
- captures
-
- 1
-
- name
- punctuation.definition.tag.begin.html
-
- 2
-
- name
- entity.name.tag.style.html
-
- 3
-
- name
- punctuation.definition.tag.html
-
-
- end
- (</)((?i:style))(>)(?:\s*\n)?
- name
- source.postcss.embedded.html
- patterns
-
-
- include
- #tag-stuff
-
-
- begin
- (>)
- beginCaptures
-
- 1
-
- name
- punctuation.definition.tag.end.html
-
-
- end
- (?=</(?i:style))
- patterns
-
-
- include
- source.postcss
-
-
-
-
-
-
- begin
- (?:^\s+)?(<)((?i:style))\b(?=[^>]*lang=(['"])sass\1?)
- captures
-
- 1
-
- name
- punctuation.definition.tag.begin.html
-
- 2
-
- name
- entity.name.tag.style.html
-
- 3
-
- name
- punctuation.definition.tag.html
-
-
- end
- (</)((?i:style))(>)(?:\s*\n)?
- name
- source.sass.embedded.html
- patterns
-
-
- include
- #tag-stuff
-
-
- begin
- (>)
- beginCaptures
-
- 1
-
- name
- punctuation.definition.tag.end.html
-
-
- end
- (?=</(?i:style))
- patterns
-
-
- include
- source.sass
-
-
- include
- source.scss
-
-
-
-
-
-
- begin
- (?:^\s+)?(<)((?i:style))\b(?=[^>]*lang=(['"])scss\1?)
- captures
-
- 1
-
- name
- punctuation.definition.tag.begin.html
-
- 2
-
- name
- entity.name.tag.style.html
-
- 3
-
- name
- punctuation.definition.tag.html
-
-
- end
- (</)((?i:style))(>)(?:\s*\n)?
- name
- source.scss.embedded.html
- patterns
-
-
- include
- #tag-stuff
-
-
- begin
- (>)
- beginCaptures
-
- 1
-
- name
- punctuation.definition.tag.end.html
-
-
- end
- (?=</(?i:style))
- patterns
-
-
- include
- source.sass
-
-
- include
- source.scss
-
-
-
-
-
-
- begin
- (?:^\s+)?(<)((?i:style))\b(?=[^>]*lang=(['"])less\1?)
- captures
-
- 1
-
- name
- punctuation.definition.tag.begin.html
-
- 2
-
- name
- entity.name.tag.style.html
-
- 3
-
- name
- punctuation.definition.tag.html
-
-
- end
- (</)((?i:style))(>)(?:\s*\n)?
- name
- source.less.embedded.html
- patterns
-
-
- include
- #tag-stuff
-
-
- begin
- (>)
- beginCaptures
-
- 1
-
- name
- punctuation.definition.tag.end.html
-
-
- end
- (?=</(?i:style))
- patterns
-
-
- include
- source.less
-
-
-
-
-
-
- begin
- (?:^\s+)?(<)((?i:style))\b(?![^>]*/>)
- captures
-
- 1
-
- name
- punctuation.definition.tag.begin.html
-
- 2
-
- name
- entity.name.tag.style.html
-
- 3
-
- name
- punctuation.definition.tag.html
-
-
- end
- (</)((?i:style))(>)(?:\s*\n)?
- name
- source.css.embedded.html
- patterns
-
-
- include
- #tag-stuff
-
-
- begin
- (>)
- beginCaptures
-
- 1
-
- name
- punctuation.definition.tag.end.html
-
-
- end
- (?=</(?i:style))
- patterns
-
-
- include
- source.css
-
-
-
-
-
-
- begin
- (?:^\s+)?(<)((?i:script))\b(?=[^>]*lang=(['"])coffee\1?)
- beginCaptures
-
- 1
-
- name
- punctuation.definition.tag.begin.html
-
- 2
-
- name
- entity.name.tag.script.html
-
-
- end
- (?<=</(script|SCRIPT))(>)(?:\s*\n)?
- endCaptures
-
- 2
-
- name
- punctuation.definition.tag.html
-
-
- name
- source.coffee.embedded.html
- patterns
-
-
- include
- #tag-stuff
-
-
- begin
- (?<!</(?:script|SCRIPT))(>)
- captures
-
- 1
-
- name
- punctuation.definition.tag.begin.html
-
- 2
-
- name
- entity.name.tag.script.html
-
-
- end
- (</)((?i:script))
- patterns
-
-
- include
- source.coffee
-
-
-
-
-
-
- begin
- (?:^\s+)?(<)((?i:script))\b(?=[^>]*lang=(['"])livescript\1?)
- beginCaptures
-
- 1
-
- name
- punctuation.definition.tag.begin.html
-
- 2
-
- name
- entity.name.tag.script.html
-
-
- end
- (?<=</(script|SCRIPT))(>)(?:\s*\n)?
- endCaptures
-
- 2
-
- name
- punctuation.definition.tag.html
-
-
- name
- source.livescript.embedded.html
- patterns
-
-
- include
- #tag-stuff
-
-
- begin
- (?<!</(?:script|SCRIPT))(>)
- captures
-
- 1
-
- name
- punctuation.definition.tag.begin.html
-
- 2
-
- name
- entity.name.tag.script.html
-
-
- end
- (</)((?i:script))
- patterns
-
-
- include
- source.livescript
-
-
-
-
-
-
- begin
- (<)((?i:script))\b(?![^>]*/>)(?![^>]*(?i:type.?=.?text/((?!javascript|babel|ecmascript).*)))
- beginCaptures
-
- 1
-
- name
- punctuation.definition.tag.begin.html
-
- 2
-
- name
- entity.name.tag.script.html
-
-
- end
- (?<=</(script|SCRIPT))(>)(?:\s*\n)?
- endCaptures
-
- 2
-
- name
- punctuation.definition.tag.html
-
-
- name
- source.js.embedded.html
- patterns
-
-
- include
- #tag-stuff
-
-
- begin
- (?<!</(?:script|SCRIPT))(>)
- captures
-
- 1
-
- name
- punctuation.definition.tag.begin.html
-
- 2
-
- name
- entity.name.tag.script.html
-
-
- end
- (</)((?i:script))
- patterns
-
-
- captures
-
- 1
-
- name
- punctuation.definition.comment.js
-
-
- match
- (//).*?((?=</script)|$\n?)
- name
- comment.line.double-slash.js
-
-
- begin
- /\*
- captures
-
- 0
-
- name
- punctuation.definition.comment.js
-
-
- end
- \*/|(?=</script)
- name
- comment.block.js
-
-
- include
- source.js
-
-
-
-
-
-
- begin
- (</?)((?i:body|head|html)\b)
- captures
-
- 1
-
- name
- punctuation.definition.tag.begin.html
-
- 2
-
- name
- entity.name.tag.structure.any.html
-
-
- end
- (>)
- endCaptures
-
- 1
-
- name
- punctuation.definition.tag.end.html
-
-
- name
- meta.tag.structure.any.html
- patterns
-
-
- include
- #tag-stuff
-
-
-
-
- begin
- (</?)((?i:address|blockquote|dd|div|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|menu|pre)\b)
- beginCaptures
-
- 1
-
- name
- punctuation.definition.tag.begin.html
-
- 2
-
- name
- entity.name.tag.block.any.html
-
-
- end
- (>)
- endCaptures
-
- 1
-
- name
- punctuation.definition.tag.end.html
-
-
- name
- meta.tag.block.any.html
- patterns
-
-
- include
- #tag-stuff
-
-
-
-
- begin
- (</?)((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|ins|isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|param|q|s|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var)\b)
- beginCaptures
-
- 1
-
- name
- punctuation.definition.tag.begin.html
-
- 2
-
- name
- entity.name.tag.inline.any.html
-
-
- end
- ((?: ?/)?>)
- endCaptures
-
- 1
-
- name
- punctuation.definition.tag.end.html
-
-
- name
- meta.tag.inline.any.html
- patterns
-
-
- include
- #tag-stuff
-
-
-
-
- begin
- (</?)([a-zA-Z0-9:-]+)
- beginCaptures
-
- 1
-
- name
- punctuation.definition.tag.begin.html
-
- 2
-
- name
- entity.name.tag.other.html
-
-
- end
- (>)
- endCaptures
-
- 1
-
- name
- punctuation.definition.tag.end.html
-
-
- name
- meta.tag.other.html
- patterns
-
-
- include
- #tag-stuff
-
-
-
-
- include
- #entities
-
-
- match
- <>
- name
- invalid.illegal.incomplete.html
-
-
- match
- <
- name
- invalid.illegal.bad-angle-bracket.html
-
-
- repository
-
- entities
-
- patterns
-
-
- captures
-
- 1
-
- name
- punctuation.definition.entity.html
-
- 3
-
- name
- punctuation.definition.entity.html
-
-
- match
- (&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)
- name
- constant.character.entity.html
-
-
- match
- &
- name
- invalid.illegal.bad-ampersand.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
- #vue-interpolations
-
-
- include
- #entities
-
-
-
- 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
- #vue-interpolations
-
-
- include
- #entities
-
-
-
- tag-generic-attribute
-
- match
- \b([a-zA-Z\-:]+)
- name
- entity.other.attribute-name.html
-
- tag-id-attribute
-
- begin
- \b(id)\b\s*(=)
- captures
-
- 1
-
- name
- entity.other.attribute-name.id.html
-
- 2
-
- name
- punctuation.separator.key-value.html
-
-
- end
- (?<='|")
- name
- meta.attribute-with-value.id.html
- patterns
-
-
- begin
- "
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.html
-
-
- contentName
- meta.toc-list.id.html
- end
- "
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.html
-
-
- name
- string.quoted.double.html
- patterns
-
-
- include
- #vue-interpolations
-
-
- include
- #entities
-
-
-
-
- begin
- '
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.html
-
-
- contentName
- meta.toc-list.id.html
- end
- '
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.html
-
-
- name
- string.quoted.single.html
- patterns
-
-
- include
- #vue-interpolations
-
-
- include
- #entities
-
-
-
-
-
- tag-stuff
-
- patterns
-
-
- include
- #vue-directives
-
-
- include
- #tag-id-attribute
-
-
- include
- #tag-generic-attribute
-
-
- include
- #string-double-quoted
-
-
- include
- #string-single-quoted
-
-
-
- vue-directives
-
- begin
- (?:\b(v-)|(:|@))([a-zA-Z\-]+)(?:\:([a-zA-Z\-]+))?(?:\.([a-zA-Z\-]+))*\s*(=)
- captures
-
- 1
-
- name
- entity.other.attribute-name.html
-
- 2
-
- name
- punctuation.separator.key-value.html
-
- 3
-
- name
- entity.other.attribute-name.html
-
- 4
-
- name
- entity.other.attribute-name.html
-
- 5
-
- name
- entity.other.attribute-name.html
-
- 6
-
- name
- punctuation.separator.key-value.html
-
-
- end
- (?<='|")
- name
- meta.directive.vue
- patterns
-
-
- begin
- "
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.html
-
-
- end
- "
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.html
-
-
- name
- source.directive.vue
- patterns
-
-
- include
- source.js
-
-
-
-
- begin
- '
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.html
-
-
- end
- '
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.html
-
-
- name
- source.directive.vue
- patterns
-
-
- include
- source.js
-
-
-
-
-
- vue-interpolations
-
- patterns
-
-
- begin
- \{\{\{?
- beginCaptures
-
- 0
-
- name
- punctuation.definition.generic.begin.html
-
-
- end
- \}\}\}?
- endCaptures
-
- 0
-
- name
- punctuation.definition.generic.end.html
-
-
- name
- expression.embbeded.vue
- patterns
-
-
- include
- source.js
-
-
-
-
-
-
- scopeName
- text.html.vue
- uuid
- 5512c10d-4cc5-434c-b8fc-53b912f55ab3
-
-