├── README.md ├── grammars └── vue.cson ├── package.json └── settings └── language-vue.cson /README.md: -------------------------------------------------------------------------------- 1 | Syntax highlighting for single-file [Vue.js](http://vuejs.org) components supports in [Atom](https://atom.io/) (enabled by [Vueify](https://github.com/vuejs/vueify) or [vue-loader](https://github.com/vuejs/vue-loader)). 2 | 3 | *This syntax highlighting is translated from [Vue.js author's Sublime Text syntax highlighting for single-file Vue components](https://github.com/vuejs/vue-syntax-highlight).* 4 | 5 | **NOTE:** You still need to install corresponding packages for pre-processors (e.g. Jade, SASS, CoffeeScript) to get proper syntax highlighting for them. 6 | -------------------------------------------------------------------------------- /grammars/vue.cson: -------------------------------------------------------------------------------- 1 | 'name': 'Vue Component' 2 | 'scopeName': 'text.html.vue' 3 | 'fileTypes': [ 4 | 'vue' 5 | 'vue.html' 6 | ] 7 | 'firstLineMatch': ')$<\?(?:php)?.*\b(if|for(each)?|while)\b.+:\{\{?(if|foreach|capture|literal|foreach|php|section|strip)\{\s*($|\?>\s*$|//|/\*(.*\*/\s*$|(?!.*?\*/))))' 9 | 'foldingStopMarker': '(?x)(^(?!.*?$<\?(?:php)?.*\bend(if|for(each)?|while)\b\{\{?/(if|foreach|capture|literal|foreach|php|section|strip)^[^{]*\})' 10 | 'keyEquivalent': '^~H' 11 | 'patterns': [ 12 | { 13 | 'endCaptures': 14 | '1': 'name': 'punctuation.definition.tag.end.html' 15 | '2': 'name': 'punctuation.definition.tag.begin.html meta.scope.between-tag-pair.html' 16 | '3': 'name': 'punctuation.definition.tag.begin.html' 17 | '4': 'name': 'entity.name.tag.html' 18 | '5': 'name': 'punctuation.definition.tag.end.html' 19 | 'patterns': [ { 'include': '#tag-stuff' } ] 20 | 'beginCaptures': 21 | '1': 'name': 'punctuation.definition.tag.begin.html' 22 | '2': 'name': 'entity.name.tag.html' 23 | 'begin': '(<)([a-zA-Z0-9:]++)(?=[^>]*>)' 24 | 'name': 'meta.tag.any.html' 25 | 'end': '(>)(<)(/)(\\2)(>)' 26 | } 27 | { 28 | 'captures': 29 | '1': 'name': 'punctuation.definition.tag.html' 30 | '2': 'name': 'entity.name.tag.xml.html' 31 | 'patterns': [ 32 | { 'include': '#tag-generic-attribute' } 33 | { 'include': '#string-double-quoted' } 34 | { 'include': '#string-single-quoted' } 35 | ] 36 | 'begin': '(<\\?)(xml) ' 37 | 'name': 'meta.tag.preprocessor.xml.html' 38 | 'end': '(\\?>)' 39 | } 40 | { 41 | 'captures': '0': 'name': 'punctuation.definition.comment.html' 42 | 'patterns': [ 43 | { 44 | 'name': 'invalid.illegal.bad-comments-or-CDATA.html' 45 | 'match': '--' 46 | } 47 | { 'include': '#embedded-code' } 48 | ] 49 | 'begin': '