├── .gitignore ├── .vscode └── launch.json ├── .vscodeignore ├── LICENSE ├── README.md ├── images ├── screenshot.png └── vuejs-logo.png ├── package.json ├── snippets └── snippets.json ├── syntaxes └── vue.tmLanguage.json ├── vsc-extension-quickstart.md └── vue.configuration.json /.gitignore: -------------------------------------------------------------------------------- 1 | *.vsix -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that compiles the extension and then opens it inside a new window 2 | { 3 | "version": "0.1.0", 4 | "configurations": [ 5 | { 6 | "name": "Launch Extension", 7 | "type": "extensionHost", 8 | "request": "launch", 9 | "runtimeExecutable": "${execPath}", 10 | "args": ["--extensionDevelopmentPath=${workspaceRoot}" ] 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .gitignore 3 | vsc-extension-quickstart.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Liu Ji 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vscode-vue 2 | Syntax Highlight for Vue.js 3 | 4 | ## Oops 5 | 6 | Sorry for the bad news: ES2015 support is still buggy. 7 | 8 | When using embeded `\n", 11 | "description": "", 12 | "scope": "text.html" 13 | }, 14 | "delete": { 15 | "prefix": "delete", 16 | "body": "${1:vm}.$delete(${2:key})\n", 17 | "description": "", 18 | "scope": "source.js" 19 | }, 20 | "eval": { 21 | "prefix": "eval", 22 | "body": "${1:vm}.$eval(${2:msg} | ${3:uppercase})\n", 23 | "description": "", 24 | "scope": "source.js" 25 | }, 26 | "set": { 27 | "prefix": "set", 28 | "body": "${1:vm}.$set(${2:expression}, ${3:value})\n", 29 | "description": "", 30 | "scope": "source.js" 31 | }, 32 | "get": { 33 | "prefix": "get", 34 | "body": "${1:vm}.$get(${expression})\n", 35 | "description": "", 36 | "scope": "source.js" 37 | }, 38 | "ipo": { 39 | "prefix": "ipo", 40 | "body": "${1:vm}.$interpolate(${2:templateString})\n", 41 | "description": "", 42 | "scope": "source.js" 43 | }, 44 | "log": { 45 | "prefix": "log", 46 | "body": "${1:vm}.$log(${2:[keyPath-optional]})\n", 47 | "description": "", 48 | "scope": "source.js" 49 | }, 50 | "v": { 51 | "prefix": "v", 52 | "body": ": {\n\t${1://content\\}\n\\}\n", 53 | "description": "", 54 | "scope": "source.js" 55 | }, 56 | "vue-config": { 57 | "prefix": "vue-config", 58 | "body": "{\n\tdebug: ${1:true},\n\tstrict: ${2:false},\n\tprefix: ${3:'v-'},\n\tdelimiters: ${4:['{{', '\\}\\}']},\n\tsilent: ${5:false},\n\tinterpolate: ${6:true},\n\tasync: ${7:true},\n\tproto: ${8:true}\n\\}\n", 59 | "description": "", 60 | "scope": "source.js" 61 | }, 62 | "vue-dir": { 63 | "prefix": "vue-dir", 64 | "body": "Vue.directive('${1:my-directive}',\n\tbind: function () {\n\t\t${2://content}\n\t\\},\n\tupdate: function (newValue, oldValue) {\n\t\t${3://content}\n\t\\},\n\tunbind: function () {\n\t\t${3://content}\n\t\\}\n\\})\n", 65 | "description": "", 66 | "scope": "source.js" 67 | }, 68 | "vue-extend": { 69 | "prefix": "vue-extend", 70 | "body": "var ${1:Profile} = Vue.extend\n\ttemplate: ${2:'

{{firstName\\}\\} {{lastName\\}\\} aka {{alias\\}\\}

'}\n\\})\n", 71 | "description": "", 72 | "scope": "source.js" 73 | }, 74 | "vue-filter": { 75 | "prefix": "vue-filter", 76 | "body": "Vue.filter('${1:my-filter}', function (${2:value}) {\n\t${3://content}\n\\})\n", 77 | "description": "", 78 | "scope": "source.js" 79 | }, 80 | "vue": { 81 | "prefix": "vue", 82 | "body": "var ${1:vm} = new Vue({\n\tel: \"#${2:replace}\"\n\\})\n", 83 | "description": "", 84 | "scope": "source.js" 85 | }, 86 | "wat": { 87 | "prefix": "wat", 88 | "body": "${1:vm}.$watch('${2:someObject}', function (${3:newVal}, ${4:oldVal}) {\n\t${5://content}\n\\})\n", 89 | "description": "", 90 | "scope": "source.js" 91 | } 92 | } -------------------------------------------------------------------------------- /syntaxes/vue.tmLanguage.json: -------------------------------------------------------------------------------- 1 | { 2 | "fileTypes": [ 3 | "vue" 4 | ], 5 | "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)", 6 | "foldingStopMarker": "(?x)\n(<\/(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|li|form|dl)>\n|^(?!.*?$\n|<\\?(?:php)?.*\\bend(if|for(each)?|while)\\b\n|\\{\\{?\/(if|foreach|capture|literal|foreach|php|section|strip)\n|^[^{]*\\}\n)", 7 | "keyEquivalent": "^~H", 8 | "name": "Vue Component", 9 | "patterns": [ 10 | { 11 | "include": "#vue-interpolations" 12 | }, 13 | { 14 | "begin": "(<)([a-zA-Z0-9:-]++)(?=[^>]*><\/\\2>)", 15 | "beginCaptures": { 16 | "1": { 17 | "name": "punctuation.definition.tag.begin.html" 18 | }, 19 | "2": { 20 | "name": "entity.name.tag.html" 21 | } 22 | }, 23 | "end": "(>)(<)(\/)(\\2)(>)", 24 | "endCaptures": { 25 | "1": { 26 | "name": "punctuation.definition.tag.end.html" 27 | }, 28 | "2": { 29 | "name": "punctuation.definition.tag.begin.html meta.scope.between-tag-pair.html" 30 | }, 31 | "3": { 32 | "name": "punctuation.definition.tag.begin.html" 33 | }, 34 | "4": { 35 | "name": "entity.name.tag.html" 36 | }, 37 | "5": { 38 | "name": "punctuation.definition.tag.end.html" 39 | } 40 | }, 41 | "name": "meta.tag.any.html", 42 | "patterns": [ 43 | { 44 | "include": "#tag-stuff" 45 | } 46 | ] 47 | }, 48 | { 49 | "begin": "(<\\?)(xml)", 50 | "captures": { 51 | "1": { 52 | "name": "punctuation.definition.tag.html" 53 | }, 54 | "2": { 55 | "name": "entity.name.tag.xml.html" 56 | } 57 | }, 58 | "end": "(\\?>)", 59 | "name": "meta.tag.preprocessor.xml.html", 60 | "patterns": [ 61 | { 62 | "include": "#tag-generic-attribute" 63 | }, 64 | { 65 | "include": "#string-double-quoted" 66 | }, 67 | { 68 | "include": "#string-single-quoted" 69 | } 70 | ] 71 | }, 72 | { 73 | "begin": "