added vscode extensions

This commit is contained in:
tomit4 2021-11-05 11:26:45 -07:00
parent 7cde0829be
commit 26e2a50441
316 changed files with 37301 additions and 0 deletions

View file

@ -0,0 +1 @@
_

View file

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn lint-staged

View file

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Language="en-US" Id="vetur" Version="0.34.1" Publisher="octref"/>
<DisplayName>Vetur</DisplayName>
<Description xml:space="preserve">Vue tooling for VS Code</Description>
<Tags>vetur,Vue,vue,vuejs,__ext_vue,vue-html,Vue-html,vue-postcss,Vue-PostCSS,Vue-POSTCSS,vue-sugarss,Vue-SugarSS,Vue-SUGARSS</Tags>
<Categories>Programming Languages</Categories>
<GalleryFlags>Public</GalleryFlags>
<Badges></Badges>
<Properties>
<Property Id="Microsoft.VisualStudio.Code.Engine" Value="^1.52.0" />
<Property Id="Microsoft.VisualStudio.Code.ExtensionDependencies" Value="" />
<Property Id="Microsoft.VisualStudio.Code.ExtensionPack" Value="" />
<Property Id="Microsoft.VisualStudio.Code.ExtensionKind" Value="workspace" />
<Property Id="Microsoft.VisualStudio.Code.LocalizedLanguages" Value="" />
<Property Id="Microsoft.VisualStudio.Services.Links.Source" Value="https://github.com/vuejs/vetur.git" />
<Property Id="Microsoft.VisualStudio.Services.Links.Getstarted" Value="https://github.com/vuejs/vetur.git" />
<Property Id="Microsoft.VisualStudio.Services.Links.GitHub" Value="https://github.com/vuejs/vetur.git" />
<Property Id="Microsoft.VisualStudio.Services.GitHubFlavoredMarkdown" Value="true" />
</Properties>
<License>extension/LICENSE.txt</License>
<Icon>extension/asset/vue.png</Icon>
</Metadata>
<Installation>
<InstallationTarget Id="Microsoft.VisualStudio.Code"/>
</Installation>
<Dependencies/>
<Assets>
<Asset Type="Microsoft.VisualStudio.Code.Manifest" Path="extension/package.json" Addressable="true" />
<Asset Type="Microsoft.VisualStudio.Services.Content.Details" Path="extension/README.md" Addressable="true" /><Asset Type="Microsoft.VisualStudio.Services.Content.Changelog" Path="extension/CHANGELOG.md" Addressable="true" /><Asset Type="Microsoft.VisualStudio.Services.Content.License" Path="extension/LICENSE.txt" Addressable="true" /><Asset Type="Microsoft.VisualStudio.Services.Icons.Default" Path="extension/asset/vue.png" Addressable="true" />
</Assets>
</PackageManifest>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2017 Pine Wu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -0,0 +1,94 @@
<p>
<h1 align="center">Vetur</h1>
</p>
<p align="center">
<a href="https://github.com/vuejs/vetur/actions?query=workflow%3A%22Node+CI%22">
<img src="https://img.shields.io/github/workflow/status/vuejs/vetur/Node%20CI?label=%20&logo=github&style=flat-square&logoColor=white&color=42b883">
</a>
<a href="https://marketplace.visualstudio.com/items?itemName=octref.vetur">
<img src="https://vsmarketplacebadge.apphb.com/version-short/octref.vetur.svg?label=%20&style=flat-square&color=42b883">
</a>
<a href="https://marketplace.visualstudio.com/items?itemName=octref.vetur">
<img src="https://vsmarketplacebadge.apphb.com/installs-short/octref.vetur.svg?label=%20&style=flat-square&color=35495e">
</a>
<a href="https://marketplace.visualstudio.com/items?itemName=octref.vetur">
<img src="https://vsmarketplacebadge.apphb.com/rating-short/octref.vetur.svg?label=%20&style=flat-square&color=35495e">
</a>
<br>
</p>
Vue tooling for VS Code.
- [vls](https://github.com/vuejs/vetur/blob/master/./server): Vue Language Server
- [vti](https://github.com/vuejs/vetur/blob/master/./vti): Vetur Terminal Interface
- [Docs](https://vuejs.github.io/vetur)
🎉 VueConf 2017 [Slide](https://www.dropbox.com/sh/eb4w8k3orh0j391/AAB3HaJexbGLa2tCP14BI8oJa?dl=0) & [Video](https://www.youtube.com/watch?v=05tNXJ-Kric) 🎉
## Sponsors
I quit my job to travel nomadically, to work on Open Source and to conduct independent study/research.
Vetur is my main focus in Open Source. Your help will alleviate my financial burden and allow me to spend more time working on Vetur. Thank you 🙏
https://github.com/sponsors/octref
Thanks to the following companies for supporting Vetur's development:
<table width="100%">
<tr>
<td>
<a href="https://sponsorlink.codestream.com/?utm_source=vscmarket&amp;utm_campaign=vetur&amp;utm_medium=banner">
<img src="https://alt-images.codestream.com/codestream_logo_vetur.png" width="250"/>
</a>
</td>
<td>
Request and perform code reviews from inside your IDE. Review any code, even if it's a work-in-progress that hasn't been committed yet, and use jump-to-definition, your favorite keybindings, and other IDE tools.
<a title="Try CodeStream" href="https://sponsorlink.codestream.com/?utm_source=vscmarket&amp;utm_campaign=vetur&amp;utm_medium=banner">Try it free</a>.
</td>
</tr>
</table>
## Features
- [Syntax-highlighting](https://vuejs.github.io/vetur/guide/highlighting.html)
- [Semantic-highlighting](https://vuejs.github.io/vetur/guide/semantic-highlighting.md)
- [Snippet](https://vuejs.github.io/vetur/guide/snippet.html)
- [Emmet](https://vuejs.github.io/vetur/guide/emmet.html)
- [Linting / Error Checking](https://vuejs.github.io/vetur/guide/linting-error.html)
- [Formatting](https://vuejs.github.io/vetur/guide/formatting.html)
- [IntelliSense](https://vuejs.github.io/vetur/guide/intellisense.html)
- [Debugging](https://vuejs.github.io/vetur/guide/debugging.html)
- [Component Data](https://vuejs.github.io/vetur/guide/component-data.html): auto-completion and hover-information for popular Vue frameworks and your own custom components
- [Experimental Interpolation Features](https://vuejs.github.io/vetur/guide/interpolation.html): auto-completion, hover information and type-checking in Vue template
- [VTI](https://vuejs.github.io/vetur/guide/vti.html): Surface template type-checking errors on CLI
- [Global components](https://vuejs.github.io/vetur/guide/global-components.html): support define global components.
## Quick Start
- Install [Vetur](https://marketplace.visualstudio.com/items?itemName=octref.vetur).
- Try it with [Veturpack](https://github.com/octref/veturpack).
- Refer to [setup](https://vuejs.github.io/vetur/guide/setup.html) page for setting up.
- Refer to each feature's own page for setting up specific features.
## FAQ
[FAQ](https://vuejs.github.io/vetur/guide/FAQ.html)
## Limitations
- You can restart Vue language service when Vetur slow ([#2192](https://github.com/vuejs/vetur/issues/2192))
- yarn pnp (https://vuejs.github.io/vetur/guide/setup.html#yarn-pnp)
## Roadmap
See [#873](https://github.com/vuejs/vetur/issues/873).
## Contribution
See [CONTRIBUTING.md](https://github.com/vuejs/vetur/blob/master/.github/CONTRIBUTING.md)
## License
MIT © [Pine Wu](https://github.com/octref)

View file

@ -0,0 +1,88 @@
This project incorporates components from the projects listed below.
The original copyright notices and the licenses are reproduced verbatim.
1. https://github.com/vuejs/vue-syntax-highlight
===
The MIT License (MIT)
Copyright (c) 2013-2016 Evan You
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
===
2. https://github.com/microsoft/vscode
===
MIT License
Copyright (c) 2015 - present Microsoft Corporation
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
===
3. https://github.com/prettier/prettier-vscode
===
MIT License
Copyright (c) 2017 Esben Petersen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
===

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,26 @@
{
"comments": {
"blockComment": [ "<!--", "-->" ]
},
"brackets": [
["<!--", "-->"],
["<", ">"],
["{", "}"],
["(", ")"]
],
"autoClosingPairs": [
{ "open": "{", "close": "}"},
{ "open": "[", "close": "]"},
{ "open": "(", "close": ")" },
{ "open": "'", "close": "'" },
{ "open": "\"", "close": "\"" }
],
"surroundingPairs": [
{ "open": "'", "close": "'" },
{ "open": "\"", "close": "\"" },
{ "open": "{", "close": "}"},
{ "open": "[", "close": "]"},
{ "open": "(", "close": ")" },
{ "open": "<", "close": ">" }
]
}

View file

@ -0,0 +1,39 @@
{
"comments": {
// symbol used for single line comment. Remove this entry if your language does not support line comments
"lineComment": "//",
// symbols used for start and end a block comment. Remove this entry if your language does not support block comments
"blockComment": [ "/*", "*/" ]
},
// symbols used as brackets
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"]
],
// symbols that are auto closed when typing
"autoClosingPairs": [
{ "open": "{", "close": "}" },
{ "open": "[", "close": "]" },
{ "open": "(", "close": ")" },
{ "open": "\"", "close": "\"", "notIn": ["string"] },
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
{ "open": "`", "close": "`", "notIn": ["string", "comment"] },
{ "open": "/**", "close": " */", "notIn": ["string"] }
],
// symbols that that can be used to surround a selection
"surroundingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""],
["'", "'"],
["`", "`"]
],
"folding": {
"markers": {
"start": "^<(template|style|script)[^>]*>",
"end": "^</(template|style|script)>"
}
}
}

View file

@ -0,0 +1,28 @@
{
"comments": {
// symbols used for start and end a block comment. Remove this entry if your language does not support block comments
"blockComment": [ "/*", "*/" ]
},
// symbols used as brackets
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"]
],
// symbols that are auto closed when typing
"autoClosingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""],
["'", "'"]
],
// symbols that that can be used to surround a selection
"surroundingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""],
["'", "'"]
]
}

View file

@ -0,0 +1,27 @@
{
"comments": {
"lineComment": "//-"
},
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"]
],
"autoClosingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["'", "'"],
["\"", "\""]
],
"surroundingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["'", "'"],
["\"", "\""]
],
"folding": {
"offSide": true
}
}

View file

@ -0,0 +1,25 @@
{
"comments": {
// symbols used for start and end a block comment. Remove this entry if your language does not support block comments
"blockComment": [ "/*", "*/" ]
},
// symbols used as brackets
"brackets": [
["[", "]"],
["(", ")"]
],
// symbols that are auto closed when typing
"autoClosingPairs": [
["[", "]"],
["(", ")"],
["\"", "\""],
["'", "'"]
],
// symbols that that can be used to surround a selection
"surroundingPairs": [
["[", "]"],
["(", ")"],
["\"", "\""],
["'", "'"]
]
}

View file

@ -0,0 +1,636 @@
{
"name": "vetur",
"displayName": "Vetur",
"description": "Vue tooling for VS Code",
"author": "Pine Wu <octref@gmail.com>",
"icon": "asset/vue.png",
"version": "0.34.1",
"publisher": "octref",
"scripts": {
"postinstall": "run-s install:*",
"install:server": "cd server && yarn",
"install:vti": "cd vti && yarn",
"build:grammar": "ts-node --project scripts/tsconfig.json scripts/build_grammar",
"compile": "rollup -c rollup.config.js",
"watch": "rollup -c rollup.config.js -w",
"lint": "tslint -c tslint.json client/**/*.ts server/**/*.ts scripts/**/*.ts",
"build:test": "tsc -p test/tsconfig.json",
"pretest": "yarn build:test",
"test:server": "cd server && yarn test",
"test:e2e": "node ./dist-test/test/codeTestRunner.js",
"test:grammar": "node ./dist-test/test/codeTestRunner.js grammar",
"test:lsp": "node ./dist-test/test/codeTestRunner.js lsp",
"test:int": "node ./dist-test/test/codeTestRunner.js interpolation",
"test:vue3": "node ./dist-test/test/codeTestRunner.js vue3",
"test:componentData": "node ./dist-test/test/codeTestRunner.js componentData",
"test:monorepo": "node ./dist-test/test/codeTestRunner.js monorepo",
"test": "run-s test:server test:e2e",
"docs": "bash ./build/update-docs.sh",
"prepare-publish": "./build/release-cleanup.sh",
"prepare": "husky install"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.ts": [
"tslint --fix"
],
"*.{js,ts,yaml}": [
"prettier --write"
]
},
"repository": {
"type": "git",
"url": "https://github.com/vuejs/vetur.git"
},
"keywords": [
"vetur",
"Vue",
"vue",
"vuejs"
],
"categories": [
"Programming Languages"
],
"engines": {
"vscode": "^1.52.0"
},
"activationEvents": [
"onLanguage:vue"
],
"main": "./dist/vueMain.js",
"contributes": {
"commands": [
{
"command": "vetur.restartVLS",
"category": "Vetur",
"title": "Restart VLS (Vue Language Server)"
},
{
"command": "vetur.generateGrammar",
"category": "Vetur",
"title": "Generate grammar from `vetur.grammar.customBlocks`"
},
{
"command": "vetur.showCorrespondingVirtualFile",
"category": "Vetur",
"title": "Show corresponding virtual file and sourcemap"
},
{
"command": "vetur.openUserScaffoldSnippetFolder",
"category": "Vetur",
"title": "Open user scaffold snippet folder"
},
{
"command": "vetur.showOutputChannel",
"category": "Vetur",
"title": "Show Output Channel"
},
{
"command": "vetur.showDoctorInfo",
"category": "Vetur",
"title": "Show Doctor info"
}
],
"breakpoints": [
{
"language": "vue"
}
],
"languages": [
{
"id": "vue",
"aliases": [
"Vue",
"vue"
],
"extensions": [
".vue"
],
"configuration": "./languages/vue-language-configuration.json"
},
{
"id": "vue-html",
"aliases": [
"Vue-html"
],
"configuration": "./languages/vue-html-language-configuration.json"
},
{
"id": "vue-postcss",
"aliases": [
"Vue-PostCSS",
"Vue-POSTCSS",
"vue-postcss"
],
"configuration": "./languages/vue-postcss-language-configuration.json"
},
{
"id": "vue-sugarss",
"aliases": [
"Vue-SugarSS",
"Vue-SUGARSS",
"vue-sugarss"
],
"configuration": "./languages/vue-sugarss-language-configuration.json"
}
],
"grammars": [
{
"language": "vue",
"scopeName": "source.vue",
"path": "./syntaxes/vue-generated.json",
"embeddedLanguages": {
"text.html.basic": "html",
"text.html.vue-html": "vue-html",
"text.jade.slm": "slm",
"text.pug": "jade",
"text.haml": "haml",
"text.slim": "slim",
"text.html.liquid": "liquid",
"source.css": "css",
"source.css.scss": "scss",
"source.css.less": "less",
"source.css.postcss": "vue-postcss",
"source.css.sugarss": "vue-sugarss",
"source.sass": "sass",
"source.stylus": "stylus",
"source.js": "javascript",
"source.ts": "typescript",
"source.coffee": "coffeescript",
"text.html.markdown": "md",
"source.yaml": "yaml",
"source.json": "json",
"source.php": "php",
"source.graphql": "graphql"
}
},
{
"language": "vue-postcss",
"scopeName": "source.css.postcss",
"path": "./syntaxes/vue-postcss.json"
},
{
"language": "vue-sugarss",
"scopeName": "source.css.sugarss",
"path": "./syntaxes/vue-sugarss.json"
},
{
"language": "vue-html",
"scopeName": "text.html.vue-html",
"path": "./syntaxes/vue-html.tmLanguage.json",
"embeddedLanguages": {
"source.js": "javascript"
}
},
{
"path": "./syntaxes/pug/directives.tmLanguage.json",
"scopeName": "vue.pug.directives",
"injectTo": [
"source.vue"
]
},
{
"path": "./syntaxes/pug/interpolations.tmLanguage.json",
"scopeName": "vue.pug.interpolations",
"injectTo": [
"source.vue"
]
},
{
"scopeName": "markdown.vue.codeblock",
"path": "./syntaxes/markdown-vue.json",
"injectTo": [
"text.html.markdown"
],
"embeddedLanguages": {
"meta.embedded.block.vue": "vue"
}
}
],
"configuration": {
"title": "Vetur",
"properties": {
"vetur.ignoreProjectWarning": {
"type": "boolean",
"default": false,
"description": "Vetur will warn about not setup correctly for the project. You can disable it.",
"scope": "application"
},
"vetur.useWorkspaceDependencies": {
"type": "boolean",
"default": false,
"description": "Use dependencies from workspace. Currently only for TypeScript.",
"scope": "application"
},
"vetur.completion.autoImport": {
"type": "boolean",
"default": true,
"description": "Include completion for module export and auto import them"
},
"vetur.completion.scaffoldSnippetSources": {
"type": "object",
"default": {
"workspace": "💼",
"user": "🗒️",
"vetur": "✌"
},
"properties": {
"workspace": {
"type": "string",
"default": "💼",
"description": "Show Scaffold Snippets from `<WORKSPACE>/.vscode/vetur/snippets`."
},
"user": {
"type": "string",
"default": "🗒️",
"description": "Show Scaffold Snippets from `<USER-DATA-DIR>/User/snippets/vetur`."
},
"vetur": {
"type": "string",
"default": "✌",
"description": "Show Scaffold Snippets bundled in Vetur."
}
},
"description": "Where Vetur source Scaffold Snippets from and how to indicate them. Set a source to \"\" to disable it.\n\n- workspace: `<WORKSPACE>/.vscode/vetur/snippets`.\n- user: `<USER-DATA-DIR>/User/snippets/vetur`.\n- vetur: Bundled in Vetur.\n\nThe default is:\n```\n\"vetur.completion.scaffoldSnippetSources\": {\n \"workspace\": \"💼\",\n \"user\": \"🗒️\",\n \"vetur\": \"✌\"\n}\n```\n\nAlternatively, you can do:\n\n```\n\"vetur.completion.scaffoldSnippetSources\": {\n \"workspace\": \"(W)\",\n \"user\": \"(U)\",\n \"vetur\": \"(V)\"\n}\n```\n\nRead more: https://vuejs.github.io/vetur/snippet.html."
},
"vetur.completion.tagCasing": {
"type": "string",
"default": "kebab",
"enum": [
"initial",
"kebab"
],
"enumDescriptions": [
"use the key in `components: {...}` as is for tag completion and do not force any casing",
"kebab-case completion for <my-tag>"
],
"description": "Casing conversion for tag completion"
},
"vetur.grammar.customBlocks": {
"type": "object",
"default": {
"docs": "md",
"i18n": "json"
},
"description": "Mapping from custom block tag name to language name. Used for generating grammar to support syntax highlighting for custom blocks."
},
"vetur.validation.template": {
"type": "boolean",
"default": true,
"description": "Validate vue-html in <template> using eslint-plugin-vue"
},
"vetur.validation.templateProps": {
"type": "boolean",
"default": false,
"description": "Validate props usage in <template> region. Show error/warning for not passing declared props to child components and show error for passing wrongly typed interpolation expressions"
},
"vetur.validation.interpolation": {
"type": "boolean",
"default": true,
"description": "Validate interpolations in <template> region using TypeScript language service"
},
"vetur.validation.style": {
"type": "boolean",
"default": true,
"description": "Validate css/scss/less/postcss in <style>"
},
"vetur.validation.script": {
"type": "boolean",
"default": true,
"description": "Validate js/ts in <script>"
},
"vetur.format.enable": {
"type": "boolean",
"default": true,
"description": "Enable/disable the Vetur document formatter."
},
"vetur.format.options.tabSize": {
"type": "number",
"default": 2,
"description": "Number of spaces per indentation level. Inherited by all formatters."
},
"vetur.format.options.useTabs": {
"type": "boolean",
"default": false,
"description": "Use tabs for indentation. Inherited by all formatters."
},
"vetur.format.defaultFormatter.html": {
"type": "string",
"default": "prettier",
"enum": [
"none",
"prettyhtml",
"js-beautify-html",
"prettier"
],
"enumDescriptions": [
"disable formatting",
"🚧 [DEPRECATED] prettyhtml",
"html formatter of js-beautify",
"prettier"
],
"description": "Default formatter for <template> region"
},
"vetur.format.defaultFormatter.pug": {
"type": "string",
"default": "prettier",
"enum": [
"none",
"prettier"
],
"enumDescriptions": [
"disable formatting",
"prettier"
],
"description": "Default formatter for <template lang='pug'> region"
},
"vetur.format.defaultFormatter.css": {
"type": "string",
"default": "prettier",
"enum": [
"none",
"prettier"
],
"enumDescriptions": [
"disable formatting",
"css formatter using css parser from prettier"
],
"description": "Default formatter for <style> region"
},
"vetur.format.defaultFormatter.postcss": {
"type": "string",
"default": "prettier",
"enum": [
"none",
"prettier"
],
"enumDescriptions": [
"disable formatting",
"postcss formatter using css parser from prettier"
],
"description": "Default formatter for <style lang='postcss'> region"
},
"vetur.format.defaultFormatter.scss": {
"type": "string",
"default": "prettier",
"enum": [
"none",
"prettier"
],
"enumDescriptions": [
"disable formatting",
"scss formatter using scss parser from prettier"
],
"description": "Default formatter for <style lang='scss'> region"
},
"vetur.format.defaultFormatter.sass": {
"type": "string",
"default": "sass-formatter",
"enum": [
"none",
"sass-formatter"
],
"enumDescriptions": [
"disable formatting",
"sass formatter"
],
"description": "Default formatter for <style lang='sass'> region"
},
"vetur.format.defaultFormatter.less": {
"type": "string",
"default": "prettier",
"enum": [
"none",
"prettier"
],
"enumDescriptions": [
"disable formatting",
"less formatter using postcss parser from prettier"
],
"description": "Default formatter for <style lang='less'> region"
},
"vetur.format.defaultFormatter.stylus": {
"type": "string",
"default": "stylus-supremacy",
"enum": [
"none",
"stylus-supremacy"
],
"enumDescriptions": [
"disable formatting",
"stylus formatter from stylus-supremacy"
],
"description": "Default formatter for <style lang='stylus'> region"
},
"vetur.format.defaultFormatter.js": {
"type": "string",
"default": "prettier",
"enum": [
"none",
"prettier",
"prettier-eslint",
"vscode-typescript"
],
"enumDescriptions": [
"disable formatting",
"js formatter from prettier",
"prettier-eslint",
"js formatter from TypeScript"
],
"description": "Default formatter for <script> region"
},
"vetur.format.defaultFormatter.ts": {
"type": "string",
"default": "prettier",
"enum": [
"none",
"prettier",
"prettier-tslint",
"vscode-typescript"
],
"enumDescriptions": [
"disable formatting",
"ts formatter using typescript parser from prettier",
"ts formatter from TypeScript"
],
"description": "Default formatter for <script> region"
},
"vetur.format.defaultFormatterOptions": {
"type": "object",
"properties": {
"prettier": {
"type": "object",
"description": "Global prettier config used by prettier formatter. Used by `prettier` and `prettier-eslint`.\n\nVetur will prefer a prettier config file at home directory if one exists.",
"properties": {}
},
"prettyhtml": {
"type": "object",
"description": "Options for prettyhtml",
"properties": {
"printWidth": {
"type": "number",
"default": 100,
"description": "Maximum amount of characters allowed per line"
},
"singleQuote": {
"type": "boolean",
"default": false,
"description": "Whether to use single quotes by default"
},
"wrapAttributes": {
"type": "boolean",
"default": false,
"description": "Whether to wrap attributes"
},
"sortAttributes": {
"type": "boolean",
"default": false,
"description": "Whether to sort attributes"
}
}
},
"js-beautify-html": {
"type": "object",
"description": "Options for js-beautify"
}
},
"default": {
"js-beautify-html": {
"wrap_attributes": "force-expand-multiline"
},
"prettyhtml": {
"printWidth": 100,
"singleQuote": false,
"wrapAttributes": false,
"sortAttributes": false
}
},
"description": "Options for all default formatters"
},
"vetur.format.styleInitialIndent": {
"type": "boolean",
"default": false,
"description": "Whether to have initial indent for <style> region"
},
"vetur.format.scriptInitialIndent": {
"type": "boolean",
"default": false,
"description": "Whether to have initial indent for <script> region"
},
"vetur.languageFeatures.codeActions": {
"type": "boolean",
"default": true,
"description": "Whether to enable codeActions"
},
"vetur.languageFeatures.updateImportOnFileMove": {
"type": "boolean",
"default": true,
"description": "Whether to automatic updating import path when rename or move a file"
},
"vetur.languageFeatures.semanticTokens": {
"type": "boolean",
"default": true,
"description": "Whether to enable semantic highlighting. Currently only works for typescript"
},
"vetur.trace.server": {
"type": "string",
"enum": [
"off",
"messages",
"verbose"
],
"default": "off",
"description": "Traces the communication between VS Code and Vue Language Server."
},
"vetur.dev.vlsPath": {
"type": "string",
"description": "Path to vls for Vetur developers. There are two ways of using it. \n\n1. Clone vuejs/vetur from GitHub, build it and point it to the ABSOLUTE path of `/server`.\n2. `yarn global add vls` and point Vetur to the installed location (`yarn global dir` + node_modules/vls)",
"scope": "machine"
},
"vetur.dev.vlsPort": {
"type": "number",
"description": "The port that VLS listens to. Can be used for attaching to the VLS Node process for debugging / profiling.",
"default": -1
},
"vetur.dev.logLevel": {
"type": "string",
"description": "Log level for VLS",
"default": "INFO",
"enum": [
"INFO",
"DEBUG"
],
"enumDescriptions": [
"Only log info messages. This is the default.",
"Log info and debug messages."
]
},
"vetur.experimental.templateInterpolationService": {
"type": "boolean",
"default": false,
"description": "Enable template interpolation service that offers hover / definition / references in Vue interpolations."
},
"vetur.underline.refValue": {
"type": "boolean",
"default": true,
"description": "Enable underline `.value` when using composition API."
}
}
},
"semanticTokenScopes": [
{
"scopes": {
"property.refValue": [
"entity.name.function"
]
}
}
]
},
"devDependencies": {
"@rollup/plugin-commonjs": "^18.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.0.0",
"@rollup/plugin-replace": "^2.4.2",
"@types/glob": "^7.1.3",
"@types/js-yaml": "^4.0.1",
"@types/lodash": "^4.14.170",
"@types/minimist": "^1.2.1",
"@types/mocha": "^8.2.2",
"@types/node": "^15.6.1",
"@types/shelljs": "^0.8.8",
"@types/vscode": "^1.52.0",
"esbuild": "^0.12.5",
"fs-extra": "^10.0.0",
"glob": "^7.1.7",
"husky": "^6.0.0",
"js-yaml": "^4.1.0",
"lint-staged": "^11.0.0",
"minimist": "^1.2.5",
"mocha": "^8.4.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.3.0",
"rollup": "^2.50.5",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-dts": "^3.0.2",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.30.0",
"shelljs": "^0.8.4",
"ts-node": "^10.0.0",
"tslint": "^6.1.3",
"typescript": "^4.3.2",
"vscode-languageclient": "^7.0.0",
"vscode-languageserver-types": "^3.16.0",
"vscode-test": "^1.5.2"
},
"__metadata": {
"id": "2f5dd8cb-d251-4d70-abfe-ddebcb077483",
"publisherId": "c3b70842-905b-406e-8f5b-153e8de05481",
"publisherDisplayName": "Pine Wu",
"installedTimestamp": 1627023532439
}
}

View file

@ -0,0 +1,235 @@
- Start Date: 2020-10-14
- Target Major Version: 2.x & 3.x
- Reference Issues: https://github.com/vuejs/vetur/issues/2325, https://github.com/vuejs/vetur/issues/2243, https://github.com/vuejs/vetur/issues/1635, https://github.com/vuejs/vetur/issues/815, https://github.com/vuejs/vetur/issues/424
- Implementation PR: (leave this empty)
# Summary
A new configuration file for Vetur and VTI
# Basic example
```javascript
// vetur.config.js
/** @type {import('vls').VeturConfig} */
module.exports = {
// **optional** default: `{}`
// override vscode settings part
// Notice: It only affects the settings used by Vetur.
settings: {
"vetur.useWorkspaceDependencies": true,
"vetur.experimental.templateInterpolationService": true
},
// **optional** default: `[{ root: './' }]`
// support monorepos
projects: [
'./packages/repo2', // shorthand for only root.
{
// **required**
// Where is your project?
// It is relative to `vetur.config.js`.
root: './packages/repo1',
// **optional** default: `'package.json'`
// Where is `package.json` in the project?
// We use it to determine the version of vue.
// It is relative to root property.
package: './package.json',
// **optional**
// Where is TypeScript config file in the project?
// It is relative to root property.
tsconfig: './tsconfig.json',
// **optional** default: `'./.vscode/vetur/snippets'`
// Where is vetur custom snippets folders?
snippetFolder: './.vscode/vetur/snippets',
// **optional** default: `[]`
// Register globally Vue component glob.
// If you set it, you can get completion by that components.
// It is relative to root property.
// Notice: It won't actually do it. You need to use `require.context` or `Vue.component`
globalComponents: [
'./src/components/**/*.vue'
]
}
]
}
```
# Motivation
- The VTI need some method to set configuration.
- The monorepo need a baseline or logic.
- VSCode workspace config is own by vscode. I don't want to commit it in git.
- Shared settings required for team projects.
- Register global vue component.
# Detailed design
## Noun
- Vetur: a VSCode extension for Vue support.
- VTI: a CLI for Vue file type-check, diagnostics or some feature.
- VLS: vue language server, The core of everything. It is base on [language server protocol](https://microsoft.github.io/language-server-protocol/).
## Config file spec
- All path formats are used with `/`.
> Helpful for cross-platform use project.
- Only support commonjs format.
> We can use it quickly and directly.
- Use pure JavaScript.
> Same as above.
> You can get typings like `@JSDoc`.
- UTF-8 charset
## How to use
### VTI
You can use it to override VTI default settings.
```bash
vti `action`
vti -c vetur.config.js `action`
vti --config vetur.config.js `action`
```
### Vetur
This profile takes precedence over vscode setting.
It will find it when Vetur initialization.
If it isn't exist, It will use `{ settings: {}, projects: ['./'] }`.
This will ensure consistency with past behavior.
### How to find `vetur.config.js`
- Start from the root and work your way up until the file is found.
- The root is set `process.cwd()` value in VTI and you can set file path in CLI params.
PS. Each root can have its own vetur.config.js in VSCode Multi root feature.
## Property detail
### Definition
```typescript
type Glob = string
export interface VeturConfig {
settings?: { [key: string]: boolean | string | Enum },
projects?: Array<string | {
root: string,
package?: string,
tsconfig?: string,
snippetFolder?: string,
globalComponents?: Array<Glob | { name: string, path: string }>
}>
}
```
### `settings`
Incoming to vue language server config.
In VLS, it will merge (vscode setting or VTL default config) and vetur.config.js `settings`.
```typescript
import _ from 'lodash'
// original vscode config or VTI default config
const config: VLSFullConfig = params.initializationOptions?.config
? _.merge(getDefaultVLSConfig(), params.initializationOptions.config)
: getDefaultVLSConfig();
// From vetur.config.js
const veturConfig = getVeturConfigInWorkspace()
// Merge vetur.config.js
Object.keys(veturConfig.setting).forEach((key) => {
_.set(config, key, veturConfig.setting[key])
})
```
Notice: It only affects the settings used by Vetur.
For example, we use `typescript.preferences.quoteStyle` in Vetur. so you can set it.
But it don't affect original TypeScript support in VSCode.
### `projects`
The monorepo need a baseline or logic.
Possible options are `package.json` or `tsconfig.js`.
But both are used for node and typescript projects.
We're likely to waste unnecessary resources on things we don't need.
So I figured the best way to do it was through the setup.
For detailed discussion, see this [RFC](https://github.com/vuejs/vetur/pull/2377).
if `projects[]` is only a string, It is a shorthand when you only need to define `root`.
### `projects[].root`
All runtime dependencies is base on value of this property.
Like `typescript`, `prettier`, `@prettier/pug`.
Also Vetur find `./package.json` and `./tsconfig.js` by default.
### `projects[].package`
We can get the project name or dependency info from here.
But We only use it to determine the version of vue now.
But it doesn't rule out the use of more.
### `projects[].tsconfig`
Typescript project profile.
It's the key to helping us support JavaScript and TypeScript.
We also use it for support template interpolation.
#### Why isn't array?
If you are familiar with typescript, You know TypeScript allow support multiple discrete `tsconfig`.
But in the vue ecosystem, It's almost completely unsupported.
For example, We often use webpack to compile Vue projects.
The `vue-loader` call `ts-loader` for support typescript.
But `ts-loader` is only support only one `tsconfig.json`.
For these reasons, we also don't support it.
It can reduce development and maintenance costs.
PS. `jsconfig.json` is also support it.
### `projects[].snippetFolder`
Vetur Custom snippets folder path
### `projects[].globalComponents`
We have some amazing features, Like `template interpolation`.
But it only work when register component in component.
For example:
```javascript
import Comp from '@/components/Comp.vue'
export default {
components: {
Comp
}
}
```
With this property available, we will parse vue component files that match the glob on vls startup.
You can support `template interpolation` for that components anywhere in the project.
This property allow two type values in array.
- Glob (`string`) [format](https://github.com/mrmlnc/fast-glob#pattern-syntax)
Vetur will call glob lib with `projects[].root` for loading component when value is string.
It use `path.basename(fileName, path.extname(fileName))` as component name.
- Object (`{ name: string, path: string }`)
Vetur use this data directly.
It's the most flexible way.
If this is a relative path, It is based on `projects[].root`.
Notice: It won't actually do it. You need to use `require.context` and `Vue.component` in your project. [more](https://vuejs.org/v2/guide/components-registration.html#Automatic-Global-Registration-of-Base-Components)
# Drawbacks
- We need to guide the user through the new settings.
- Monorepo's support is not so automatic.
- Maintenance required to read configuration file code
- Working with multiple profiles may confuse users.
# Alternatives
- Use vscode configuration file.
- Put configuration to `vue.config.js`.
> Additional communication with `vue-cli` maintainer is required.
- Use more cli params in VTI.
# Adoption strategy
No any breaking change on it.
To guide user,
We can add a dialog when open project,
Or open a help page when vetur extensions install,
and add help in the document in Vetur.
# Unresolved questions
- How to achieve Monorepo support?
> Another RFC. https://github.com/vuejs/vetur/pull/2377

View file

@ -0,0 +1,106 @@
- Start Date: 2020-10-14
- Target Major Version: 2.x & 3.x
- Reference Issues: https://github.com/vuejs/vetur/issues/815, https://github.com/vuejs/vetur/issues/424, https://github.com/vuejs/vetur/issues/873, https://github.com/vuejs/vetur/issues/1360, https://github.com/vuejs/vetur/issues/2016
- Implementation PR: (leave this empty)
# Summery
How to achieve monorepo, sub-folders, multi-repos support?
# Basic example
a configuration in `vetur.config.js`.
Ref: https://github.com/vuejs/vetur/pull/2378
# Motivation
- This feature request is very popular.
- Monorepo is a trend in the front-end world.
- There are several ways to implement this feature.
- Attempts to resolve difficulties encountered by non-configurable users
# Detailed design
## Noun
- Vetur: a VSCode extension for Vue support.
- VTI: a CLI for Vue file type-check, diagnostics or some feature.
- VLS: vue language server, The core of everything. It is base on [language server protocol](https://microsoft.github.io/language-server-protocol/).
- LSP: [language server protocol](https://microsoft.github.io/language-server-protocol/)
- LSP server: In this rfcs, It means VLS.
- LSP client: Connect to the client for the LSP server.
- TLS: TypeScript language service, **It isn't base on LSP**. We call function like lib to used it. It provide language functionality on a project. Like: hover, completion.
- TS plugin: TypeScript Language Service Plugin. We can use it for rename, refactor features. [ref](https://github.com/microsoft/TypeScript/wiki/Writing-a-Language-Service-Plugin)
## How it achieve ?
Three possible methods are summarized below.
I'm going to try to sort out the known strengths and weaknesses.
Ref: https://github.com/microsoft/vscode/wiki/Adopting-Multi-Root-Workspace-APIs#language-client--language-server
Example: https://github.com/Microsoft/vscode-extension-samples/tree/master/lsp-multi-server-sample
Similar PR: https://github.com/vuejs/vetur/pull/1928
### Multiple LSP client
We use configuration to open multiple LSP clients.
This will open multiple LSP server(VLS).
One project scope per VLS dedicated service.
#### Benefits
- simple and easy
- Because each server has its own process, it does not interfere with performance.
- Keep VLS simple
#### Drawbacks
- Each third-party client requires its own maintenance this logic.
- More computer resources required
- Because the TS plugin has a different runtime unit, VLS and TS plugin communication is a problem, May need to deal with unexpected situations.
- Information could not be shared before the project.
### Base on TLS in LSP server
The TypeScript is support multile project in one server.
It will make one Project to one TLS.
It is based on `tsconfig.json` location.
Because only TypeScript/JavaScript feature needs this feature at the moment,
Example: https://github.com/angular/vscode-ng-language-service
PS. In this example from angular, Slightly different is that the project relies entirely on TS plugins.
Similar PR: https://github.com/vuejs/vetur/pull/1734
#### Benefits
- Simply extend TypeScript support part.
- Consistent with the implementation of VSCode.
- Consistent with the implementation of TS plugin, VLS and TS plugin communication is not a problem.
#### Drawbacks
- It may create something completely unnecessary TLS when having project no Vue, maybe need a lazy logic?
- In the vue ecosystem, it isn't support multiple `tsconfig.json`, It's a little redundant. [more info](https://github.com/vuejs/vetur/blob/vetur-config-file-rfc/rfcs/001-vetur-config-file.md#why-isnt-array)
- Performance is affected by the interplay between projects. unless the separation process is implemented with node `worker_threads`.
- ~~The template interpolation need to refactor and design~~, At least it's not a problem now. But I'm not sure if we'll break anything if we let Template interpolation have multiple files importing from each other.
- Because there is no defined project in VLS, register globally components could be inaccurate.
### Add multiple project support in LSP server
We implement this feature in the VLS.
#### Benefits
- least restrictive
- Best integrated effect
#### Drawbacks
- Development costs are unknown, Maybe `vetur.config.js` rfcs can reduce it.
- Need longer time.
## Final implementation
We don't want to put the blame on all the clients. so remove `Multiple LSP client` option.
Consider package.json and tsconfig.json issues, we will try to use `Add multiple project support in LSP server`.
Also works with `vetur.config.js` configuration file.
# Alternatives
Same as https://github.com/vuejs/vetur/blob/monorepo-rfc/rfcs/002-monorepo-support.md#how-it-achieve-
# Adoption strategy
- No breaking change
- Add a docker command for provide information when have problem
- Add monorepo and sub-folder docs
- Try to provide humane tips
# Unresolved questions
- Have any multiple `tsconfig.json` case for a Vue project?
- What to base a project on? Use `tsconfig.json`, `package.json`, or config in [RFC](https://github.com/vuejs/vetur/pull/2378)?
- Have any multiple `tsconfig.json` case for a other framework project? React? Angular?

View file

@ -0,0 +1,5 @@
module.exports = [
require('./client/rollup.config.js'),
...require('./server/rollup.config.js'),
require('./vti/rollup.config.js')
];

View file

@ -0,0 +1,3 @@
node_modules
dist
typings

View file

@ -0,0 +1,4 @@
ui: tdd
color: true
require: 'source-map-support/register'
spec: './dist-test/**/*.test.js'

View file

@ -0,0 +1 @@
message = "Vue Language Server %s"

View file

@ -0,0 +1,64 @@
## Vue Language Server
[VLS](https://www.npmjs.com/package/vls) (Vue Language Server) is a language server implementation compatible with [Language Server Protocol](https://github.com/microsoft/language-server-protocol).
Vetur is the VS Code client consuming `vls`.
It's possible for other LSP compatible editors to build language server clients that consume `vls`.
## Usage
There are two ways to integrate `vls` into editors:
1. As a global executable.
Example Client: https://github.com/autozimu/LanguageClient-neovim
First, install VLS globally.
```bash
npm install vls -g
# or yarn global add vls
```
This will provide you the global `vls` command.
Then, configure LanguageClient to use `vls`. In this example, we write below configuration into `init.vim`.
```vim
let g:LanguageClient_serverCommands = {
\ 'vue': ['vls']
\ }
```
2. As a plugin dependency.
Example: https://github.com/HerringtonDarkholme/atom-vue
First, install vls as a local dependency.
```bash
npm install vls --save
# or yarn add vls
```
Then, require the vls, this would typically look like:
```ts
class VueLanguageClient extends AutoLanguageClient {
startServerProcess () {
return cp.spawn('node', [require.resolve('vls/dist/htmlServerMain')])
}
}
```
3. As extension of [coc.nvim](https://github.com/neoclide/coc.nvim)
Install [coc.nvim](https://github.com/neoclide/coc.nvim) in your vim/neovim.
Then, run vim command
```
:CocInstall coc-vetur
```

View file

@ -0,0 +1,2 @@
#!/usr/bin/env node
require('../dist/vueServerMain.js')

View file

@ -0,0 +1,86 @@
{
"name": "vls",
"description": "Vue Language Server",
"version": "0.7.4",
"author": "Pine Wu <octref@gmail.com>",
"license": "MIT",
"main": "dist/vls.js",
"typings": "dist/vls.d.ts",
"bin": {
"vls": "./bin/vls"
},
"engines": {
"node": ">=10"
},
"files": [
"dist",
"bin"
],
"repository": {
"type": "git",
"url": "https://github.com/vuejs/vetur.git"
},
"homepage": "https://github.com/vuejs/vetur/tree/master/server",
"dependencies": {
"eslint": "^7.27.0",
"eslint-plugin-vue": "^7.10.0",
"prettier": "^2.3.0",
"tslint": "6.1.3",
"typescript": "^4.3.2"
},
"resolutions": {
"typescript": "^4.3.2"
},
"devDependencies": {
"@prettier/plugin-pug": "^1.15.2",
"@starptech/prettyhtml": "^0.10.0",
"@types/eslint": "7.2.2",
"@types/eslint-scope": "^3.7.0",
"@types/eslint-visitor-keys": "^1.0.0",
"@types/glob": "^7.1.3",
"@types/js-beautify": "1.13.1",
"@types/lodash": "^4.14.170",
"@types/mocha": "^8.2.2",
"@types/node": "^15.6.1",
"@types/prettier": "^2.2.3",
"@types/read-pkg-up": "^6.0.0",
"@types/resolve": "1.20.0",
"bootstrap-vue-helper-json": "^1.1.1",
"codecov": "^3.8.2",
"core-js": "^3.13.1",
"element-helper-json": "^2.0.6",
"fast-glob": "^3.2.5",
"glob": "^7.1.7",
"gridsome-helper-json": "^1.0.3",
"js-beautify": "^1.13.13",
"lodash": "^4.17.21",
"mocha": "^8.4.0",
"nuxt-helper-json": "^1.0.0",
"nyc": "^15.1.0",
"parse-gitignore": "^1.0.1",
"prettier-eslint": "^12.0.0",
"prettier-tslint": "^0.4.2",
"rollup": "^2.50.5",
"sass-formatter": "^0.7.1",
"source-map-support": "^0.5.19",
"stylus": "^0.54.8",
"stylus-supremacy": "^2.15.0",
"vscode-css-languageservice": "5.1.3",
"vscode-emmet-helper": "2.6.4",
"vscode-languageserver": "7.0.0",
"vscode-languageserver-textdocument": "^1.0.1",
"vscode-languageserver-types": "3.16.0",
"vscode-uri": "^3.0.2",
"vscode-web-custom-data": "^0.3.4",
"vue-eslint-parser": "^7.6.0",
"vue-onsenui-helper-json": "^1.0.2"
},
"scripts": {
"compile": "rollup -c rollup.config.js",
"watch": "rollup -c rollup.config.js -w",
"test": "tsc -p tsconfig.test.json && mocha",
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
"newVersion": "yarn version --new-version patch -m \"vls %s\"",
"preversion": "yarn compile && yarn test"
}
}

View file

@ -0,0 +1,74 @@
const fs = require('fs-extra');
const path = require('path');
const fg = require('fast-glob');
const { getRootPath, clearDist, external, onwarn, createPlugins } = require('../build/rollup-common-config');
const {
linkVlsInCLI,
bundleVlsWithEsbuild,
watchVlsChange,
generateTypingsVls
} = require('../build/rollup-plugins.js');
const vlsPkg = require('./package.json');
const dts = require('rollup-plugin-dts').default;
const getVLSPath = getRootPath('server');
clearDist(getVLSPath('dist'));
function copySnippets() {
return {
name: 'copy-snippets',
buildEnd() {
fs.copySync(getVLSPath('src/modes/vue/veturSnippets'), getVLSPath('dist/veturSnippets'), {
overwrite: true,
recursive: true
});
}
};
}
function copyTSDefaultLibs() {
return {
name: 'copy-ts-default-libs',
buildEnd() {
const files = fg.sync('node_modules/typescript/lib/lib*.d.ts', {
cwd: getVLSPath(''),
unique: true,
absolute: true
});
files.forEach(file => fs.copySync(file, getVLSPath('dist/' + path.basename(file)), { overwrite: true }));
}
};
}
module.exports = [
// vueServerMain
{
input: getVLSPath('src/vueServerMain.ts'),
output: { file: getVLSPath('dist/vueServerMain.js'), name: vlsPkg.name, format: 'cjs', sourcemap: true },
external,
onwarn,
watch: {
include: getVLSPath('**')
},
plugins: [
watchVlsChange(),
generateTypingsVls(),
bundleVlsWithEsbuild(),
copySnippets(),
// copyTSDefaultLibs(),
linkVlsInCLI(),
...createPlugins(getVLSPath('tsconfig.json'))
]
},
// bundle typings
{
input: getVLSPath('typings/main.d.ts'),
output: {
file: getVLSPath('dist/vls.d.ts'),
format: 'es'
},
onwarn,
plugins: [dts()]
}
];

View file

@ -0,0 +1,45 @@
{
"scopeName": "markdown.vue.codeblock",
"fileTypes": [],
"injectionSelector": "L:text.html.markdown",
"patterns": [
{
"include": "#vue-code-block"
}
],
"repository": {
"vue-code-block": {
"begin": "(^|\\G)(\\s*)(\\`{3,}|~{3,})\\s*(?i:(vue)(\\s+[^`~]*)?$)",
"name": "markup.fenced_code.block.markdown",
"end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
"beginCaptures": {
"3": {
"name": "punctuation.definition.markdown"
},
"5": {
"name": "fenced_code.block.language"
},
"6": {
"name": "fenced_code.block.language.attributes"
}
},
"endCaptures": {
"3": {
"name": "punctuation.definition.markdown"
}
},
"patterns": [
{
"begin": "(^|\\G)(\\s*)(.*)",
"while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)",
"contentName": "meta.embedded.block.vue",
"patterns": [
{
"include": "source.vue"
}
]
}
]
}
}
}

View file

@ -0,0 +1,5 @@
# [PackageDev] target_format: plist, ext: tmLanguage
scopeName: vue.pug.directives
injectionSelector: "L:meta.tag.other -text.html.vue-html"
patterns:
- include: 'source.vue#vue-directives'

View file

@ -0,0 +1,9 @@
{
"scopeName": "vue.pug.directives",
"injectionSelector": "L:meta.tag.other -text.html.vue-html",
"patterns": [
{
"include": "source.vue#vue-directives"
}
]
}

View file

@ -0,0 +1,5 @@
# [PackageDev] target_format: plist, ext: tmLanguage
scopeName: vue.pug.interpolations
injectionSelector: "L:text.pug"
patterns:
- include: source.vue#vue-interpolations

View file

@ -0,0 +1,9 @@
{
"scopeName": "vue.pug.interpolations",
"injectionSelector": "L:text.pug",
"patterns": [
{
"include": "source.vue#vue-interpolations"
}
]
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,253 @@
# [PackageDev] target_format: plist, ext: tmLanguage
name: Vue HTML
scopeName: text.html.vue-html
fileTypes: []
uuid: ca2e4260-5d62-45bf-8cf1-d8b5cc19c8f8
patterns:
- include: source.vue#vue-interpolations
- name: meta.tag.any.html
begin: (<)([A-Z][a-zA-Z0-9:-]*)(?=[^>]*></\2>)
beginCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: support.class.component.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: support.class.component.html }
'5': { name: punctuation.definition.tag.end.html }
patterns:
- include: '#tag-stuff'
- name: meta.tag.any.html
begin: (<)([a-z][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: <!--
end: -->
captures:
'0': { name: punctuation.definition.comment.html }
- name: meta.tag.sgml.html
begin: <!
end: '>'
captures:
'0': { name: punctuation.definition.tag.html }
patterns:
- name: meta.tag.sgml.doctype.html
begin: (?i:DOCTYPE)
end: (?=>)
captures:
'1': { name: entity.name.tag.doctype.html }
patterns:
- name: string.quoted.double.doctype.identifiers-and-DTDs.html
match: '"[^">]*"'
- name: constant.other.inline-data.html
begin: \[CDATA\[
end: ']](?=>)'
- name: invalid.illegal.bad-comments-or-CDATA.html
match: (\s*)(?!--|>)\S(\s*)
- name: meta.tag.block.any.html
begin: (</?)([A-Z][a-zA-Z0-9:-]*\b)
beginCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: support.class.component.html }
end: (>)
endCaptures:
'1': { name: punctuation.definition.tag.end.html }
patterns:
- include: '#tag-stuff'
- name: meta.tag.block.any.html
begin: (</?)([a-z][a-zA-Z0-9:-]*\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 }
patterns:
- include: '#tag-stuff'
- name: meta.tag.structure.any.html
begin: (</?)((?i:body|head|html)\b)
end: (>)
endCaptures:
'1': { name: punctuation.definition.tag.end.html }
captures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.structure.any.html }
patterns:
- include: '#tag-stuff'
- name: meta.tag.block.any.html
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 }
patterns:
- include: '#tag-stuff'
- name: meta.tag.inline.any.html
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 }
patterns:
- include: '#tag-stuff'
- name: meta.tag.other.html
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 }
patterns:
- include: '#tag-stuff'
- include: '#entities'
- name: invalid.illegal.incomplete.html
match: <>
- name: invalid.illegal.bad-angle-bracket.html
match: <
repository:
entities:
patterns:
- name: constant.character.entity.html
match: (&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)
captures:
'1': { name: punctuation.definition.entity.html }
'3': { name: punctuation.definition.entity.html }
- name: invalid.illegal.bad-ampersand.html
match: '&'
string-double-quoted:
name: string.quoted.double.html
begin: '"'
beginCaptures:
'0': { name: punctuation.definition.string.begin.html }
end: '"'
endCaptures:
'0': { name: punctuation.definition.string.end.html }
patterns:
- include: source.vue#vue-interpolations
- include: '#entities'
string-single-quoted:
name: string.quoted.single.html
begin: "'"
beginCaptures:
'0': { name: punctuation.definition.string.begin.html }
end: "'"
endCaptures:
'0': { name: punctuation.definition.string.end.html }
patterns:
- include: source.vue#vue-interpolations
- include: '#entities'
tag-generic-attribute:
name: entity.other.attribute-name.html
match: (?<=[^=])\b([a-zA-Z0-9:\-_]+)
tag-id-attribute:
name: meta.attribute-with-value.id.html
begin: \b(id)\b\s*(=)
end: (?!\G)(?<='|"|[^\s<>/])
captures:
'1': { name: entity.other.attribute-name.id.html }
'2': { name: punctuation.separator.key-value.html }
patterns:
- name: string.quoted.double.html
contentName: meta.toc-list.id.html
begin: '"'
beginCaptures:
'0': { name: punctuation.definition.string.begin.html }
end: '"'
endCaptures:
'0': { name: punctuation.definition.string.end.html }
patterns:
- include: source.vue#vue-interpolations
- include: '#entities'
- name: string.quoted.single.html
contentName: meta.toc-list.id.html
begin: "'"
beginCaptures:
'0': { name: punctuation.definition.string.begin.html }
end: "'"
endCaptures:
'0': { name: punctuation.definition.string.end.html }
patterns:
- include: source.vue#vue-interpolations
- include: '#entities'
- name: string.unquoted.html
match: (?<==)(?:[^\s<>/'"]|/(?!>))+
captures:
'0': { name: meta.toc-list.id.html }
tag-stuff:
patterns:
- include: '#vue-directives'
- include: '#tag-id-attribute'
- include: '#tag-generic-attribute'
- include: '#string-double-quoted'
- include: '#string-single-quoted'
- include: '#unquoted-attribute'
unquoted-attribute:
name: string.unquoted.html
match: (?<==)(?:[^\s<>/'"]|/(?!>))+
vue-directives:
name: meta.directive.vue
begin: (?:\b(v-)|(:|@|#))([a-zA-Z0-9\-_]+)(?:\:([a-zA-Z\-_]+))?(?:\.([a-zA-Z\-_]+))*\s*(=)
end: (?<='|")|(?=[\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 }
patterns:
- name: source.directive.vue
begin: '`'
beginCaptures:
'0': { name: punctuation.definition.string.begin.html }
end: '`'
endCaptures:
'0': { name: punctuation.definition.string.end.html }
patterns:
- include: source.js#expression
- name: source.directive.vue
begin: '"'
beginCaptures:
'0': { name: punctuation.definition.string.begin.html }
end: '"'
endCaptures:
'0': { name: punctuation.definition.string.end.html }
patterns:
- include: source.js#expression
- name: source.directive.vue
begin: "'"
beginCaptures:
'0': { name: punctuation.definition.string.begin.html }
end: "'"
endCaptures:
'0': { name: punctuation.definition.string.end.html }
patterns:
- include: source.js#expression

View file

@ -0,0 +1,558 @@
{
"name": "Vue HTML",
"scopeName": "text.html.vue-html",
"fileTypes": [],
"uuid": "ca2e4260-5d62-45bf-8cf1-d8b5cc19c8f8",
"patterns": [
{
"include": "source.vue#vue-interpolations"
},
{
"name": "meta.tag.any.html",
"begin": "(<)([A-Z][a-zA-Z0-9:-]*)(?=[^>]*></\\2>)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.tag.begin.html"
},
"2": {
"name": "support.class.component.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": "support.class.component.html"
},
"5": {
"name": "punctuation.definition.tag.end.html"
}
},
"patterns": [
{
"include": "#tag-stuff"
}
]
},
{
"name": "meta.tag.any.html",
"begin": "(<)([a-z][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": "<!--",
"end": "-->",
"captures": {
"0": {
"name": "punctuation.definition.comment.html"
}
}
},
{
"name": "meta.tag.sgml.html",
"begin": "<!",
"end": ">",
"captures": {
"0": {
"name": "punctuation.definition.tag.html"
}
},
"patterns": [
{
"name": "meta.tag.sgml.doctype.html",
"begin": "(?i:DOCTYPE)",
"end": "(?=>)",
"captures": {
"1": {
"name": "entity.name.tag.doctype.html"
}
},
"patterns": [
{
"name": "string.quoted.double.doctype.identifiers-and-DTDs.html",
"match": "\"[^\">]*\""
}
]
},
{
"name": "constant.other.inline-data.html",
"begin": "\\[CDATA\\[",
"end": "]](?=>)"
},
{
"name": "invalid.illegal.bad-comments-or-CDATA.html",
"match": "(\\s*)(?!--|>)\\S(\\s*)"
}
]
},
{
"name": "meta.tag.block.any.html",
"begin": "(</?)([A-Z][a-zA-Z0-9:-]*\\b)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.tag.begin.html"
},
"2": {
"name": "support.class.component.html"
}
},
"end": "(>)",
"endCaptures": {
"1": {
"name": "punctuation.definition.tag.end.html"
}
},
"patterns": [
{
"include": "#tag-stuff"
}
]
},
{
"name": "meta.tag.block.any.html",
"begin": "(</?)([a-z][a-zA-Z0-9:-]*\\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"
}
},
"patterns": [
{
"include": "#tag-stuff"
}
]
},
{
"name": "meta.tag.structure.any.html",
"begin": "(</?)((?i:body|head|html)\\b)",
"end": "(>)",
"endCaptures": {
"1": {
"name": "punctuation.definition.tag.end.html"
}
},
"captures": {
"1": {
"name": "punctuation.definition.tag.begin.html"
},
"2": {
"name": "entity.name.tag.structure.any.html"
}
},
"patterns": [
{
"include": "#tag-stuff"
}
]
},
{
"name": "meta.tag.block.any.html",
"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"
}
},
"patterns": [
{
"include": "#tag-stuff"
}
]
},
{
"name": "meta.tag.inline.any.html",
"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"
}
},
"patterns": [
{
"include": "#tag-stuff"
}
]
},
{
"name": "meta.tag.other.html",
"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"
}
},
"patterns": [
{
"include": "#tag-stuff"
}
]
},
{
"include": "#entities"
},
{
"name": "invalid.illegal.incomplete.html",
"match": "<>"
},
{
"name": "invalid.illegal.bad-angle-bracket.html",
"match": "<"
}
],
"repository": {
"entities": {
"patterns": [
{
"name": "constant.character.entity.html",
"match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",
"captures": {
"1": {
"name": "punctuation.definition.entity.html"
},
"3": {
"name": "punctuation.definition.entity.html"
}
}
},
{
"name": "invalid.illegal.bad-ampersand.html",
"match": "&"
}
]
},
"string-double-quoted": {
"name": "string.quoted.double.html",
"begin": "\"",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.html"
}
},
"end": "\"",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.html"
}
},
"patterns": [
{
"include": "source.vue#vue-interpolations"
},
{
"include": "#entities"
}
]
},
"string-single-quoted": {
"name": "string.quoted.single.html",
"begin": "'",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.html"
}
},
"end": "'",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.html"
}
},
"patterns": [
{
"include": "source.vue#vue-interpolations"
},
{
"include": "#entities"
}
]
},
"tag-generic-attribute": {
"name": "entity.other.attribute-name.html",
"match": "(?<=[^=])\\b([a-zA-Z0-9:\\-_]+)"
},
"tag-id-attribute": {
"name": "meta.attribute-with-value.id.html",
"begin": "\\b(id)\\b\\s*(=)",
"end": "(?!\\G)(?<='|\"|[^\\s<>/])",
"captures": {
"1": {
"name": "entity.other.attribute-name.id.html"
},
"2": {
"name": "punctuation.separator.key-value.html"
}
},
"patterns": [
{
"name": "string.quoted.double.html",
"contentName": "meta.toc-list.id.html",
"begin": "\"",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.html"
}
},
"end": "\"",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.html"
}
},
"patterns": [
{
"include": "source.vue#vue-interpolations"
},
{
"include": "#entities"
}
]
},
{
"name": "string.quoted.single.html",
"contentName": "meta.toc-list.id.html",
"begin": "'",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.html"
}
},
"end": "'",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.html"
}
},
"patterns": [
{
"include": "source.vue#vue-interpolations"
},
{
"include": "#entities"
}
]
},
{
"name": "string.unquoted.html",
"match": "(?<==)(?:[^\\s<>/'\"]|/(?!>))+",
"captures": {
"0": {
"name": "meta.toc-list.id.html"
}
}
}
]
},
"tag-stuff": {
"patterns": [
{
"include": "#vue-directives"
},
{
"include": "#tag-id-attribute"
},
{
"include": "#tag-generic-attribute"
},
{
"include": "#string-double-quoted"
},
{
"include": "#string-single-quoted"
},
{
"include": "#unquoted-attribute"
}
]
},
"unquoted-attribute": {
"name": "string.unquoted.html",
"match": "(?<==)(?:[^\\s<>/'\"]|/(?!>))+"
},
"vue-directives": {
"name": "meta.directive.vue",
"begin": "(?:\\b(v-)|(:|@|#))([a-zA-Z0-9\\-_]+)(?:\\:([a-zA-Z\\-_]+))?(?:\\.([a-zA-Z\\-_]+))*\\s*(=)",
"end": "(?<='|\")|(?=[\\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"
}
},
"patterns": [
{
"name": "source.directive.vue",
"begin": "`",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.html"
}
},
"end": "`",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.html"
}
},
"patterns": [
{
"include": "source.js#expression"
}
]
},
{
"name": "source.directive.vue",
"begin": "\"",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.html"
}
},
"end": "\"",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.html"
}
},
"patterns": [
{
"include": "source.js#expression"
}
]
},
{
"name": "source.directive.vue",
"begin": "'",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.html"
}
},
"end": "'",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.html"
}
},
"patterns": [
{
"include": "source.js#expression"
}
]
}
]
}
}
}

View file

@ -0,0 +1,374 @@
{
"patterns": [
{
"patterns": [
{
"include": "#comment-tag"
}
],
"begin": "/\\*",
"name": "comment.block.postcss",
"end": "\\*/"
},
{
"include": "#double-slash"
},
{
"include": "#double-quoted"
},
{
"include": "#single-quoted"
},
{
"include": "#interpolation"
},
{
"include": "#placeholder-selector"
},
{
"include": "#variable"
},
{
"include": "#variable-root-css"
},
{
"include": "#numeric"
},
{
"include": "#unit"
},
{
"include": "#flag"
},
{
"include": "#dotdotdot"
},
{
"captures": {
"0": {
"name": "keyword.control.at-rule.css.postcss"
}
},
"begin": "@include",
"name": "support.function.name.postcss.library",
"end": "(?=\\n|\\(|{|;)"
},
{
"captures": {
"0": {
"name": "keyword.control.at-rule.css.postcss"
}
},
"patterns": [
{
"name": "entity.name.function",
"match": "[\\w-]+"
}
],
"begin": "@mixin|@function",
"name": "support.function.name.postcss.no-completions",
"end": "$\\n?|(?=\\(|{)"
},
{
"name": "string.quoted.double.css.postcss",
"match": "(?<=@import)\\s[\\w/.*-]+"
},
{
"begin": "@",
"name": "keyword.control.at-rule.css.postcss",
"end": "$\\n?|\\s(?!(all|braille|embossed|handheld|print|projection|screen|speech|tty|tv|if|only|not)(\\s|,))|(?=;)"
},
{
"patterns": [
{
"include": "#interpolation"
},
{
"include": "#pseudo-class"
}
],
"begin": "#",
"name": "entity.other.attribute-name.id.css.postcss",
"end": "$\\n?|(?=\\s|,|;|\\(|\\)|\\.|\\[|{|>)"
},
{
"patterns": [
{
"include": "#interpolation"
},
{
"include": "#pseudo-class"
}
],
"begin": "\\.|(?<=&)(-|_)",
"name": "entity.other.attribute-name.class.css.postcss",
"end": "$\\n?|(?=\\s|,|;|\\(|\\)|\\[|{|>)"
},
{
"patterns": [
{
"include": "#double-quoted"
},
{
"include": "#single-quoted"
},
{
"name": "keyword.other.regex.postcss",
"match": "\\^|\\$|\\*|~"
}
],
"begin": "\\[",
"name": "entity.other.attribute-selector.postcss",
"end": "\\]"
},
{
"name": "entity.other.attribute-name.pseudo-class.css.postcss",
"match": "(?<=\\]|\\)|not\\(|\\*|>|>\\s):[a-z:-]+|(::|:-)[a-z:-]+"
},
{
"patterns": [
{
"include": "#double-slash"
},
{
"include": "#double-quoted"
},
{
"include": "#single-quoted"
},
{
"include": "#interpolation"
},
{
"include": "#variable"
},
{
"include": "#rgb-value"
},
{
"include": "#numeric"
},
{
"include": "#unit"
},
{
"include": "#flag"
},
{
"include": "#function"
},
{
"include": "#function-content"
},
{
"include": "#function-content-var"
},
{
"include": "#operator"
},
{
"include": "#parent-selector"
},
{
"include": "#property-value"
}
],
"begin": ":",
"name": "meta.property-list.css.postcss",
"end": "$\\n?|(?=;|\\s\\(|and\\(|{|}|\\),)"
},
{
"include": "#rgb-value"
},
{
"include": "#function"
},
{
"include": "#function-content"
},
{
"patterns": [
{
"include": "#interpolation"
},
{
"include": "#pseudo-class"
}
],
"begin": "(?<!\\-|\\()\\b(a|abbr|acronym|address|applet|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|embed|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|picture|pre|progress|q|samp|script|section|select|small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video|main|svg|rect|ruby|center|circle|ellipse|line|polyline|polygon|path|text|u|x)\\b(?!-|\\)|:\\s)|&",
"name": "entity.name.tag.css.postcss.symbol",
"end": "(?=\\s|,|;|\\(|\\)|\\.|\\[|{|>|-|_)"
},
{
"include": "#operator"
},
{
"name": "support.type.property-name.css.postcss",
"match": "[a-z-]+((?=:|#{))"
},
{
"include": "#reserved-words"
},
{
"include": "#property-value"
}
],
"name": "PostCSS",
"repository": {
"reserved-words": {
"name": "support.type.property-name.css.postcss",
"match": "\\b(false|from|in|not|null|through|to|true)\\b"
},
"double-quoted": {
"patterns": [
{
"include": "#quoted-interpolation"
}
],
"begin": "\"",
"name": "string.quoted.double.css.postcss",
"end": "\""
},
"operator": {
"name": "keyword.operator.postcss",
"match": "\\+|\\s-\\s|\\s-(?=\\$)|(?<=\\()-(?=\\$)|\\s-(?=\\()|\\*|/|%|=|!|<|>|~"
},
"function-content": {
"name": "string.quoted.double.css.postcss",
"match": "(?<=url\\(|format\\(|attr\\().+?(?=\\))"
},
"double-slash": {
"patterns": [
{
"include": "#comment-tag"
}
],
"begin": "//",
"name": "comment.line.postcss",
"end": "$"
},
"numeric": {
"name": "constant.numeric.css.postcss",
"match": "(-|\\.)?[0-9]+(\\.[0-9]+)?"
},
"variable-root-css": {
"name": "variable.parameter.postcss",
"match": "(?<!&)--[\\w-]+"
},
"function": {
"name": "support.function.name.postcss",
"match": "(?<=[\\s|\\(|,|:])(?!url|format|attr)[\\w-][\\w-]*(?=\\()"
},
"rgb-value": {
"name": "constant.other.color.rgb-value.css.postcss",
"match": "(#)([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\\b"
},
"comment-tag": {
"patterns": [
{
"name": "comment.tag.postcss",
"match": "[\\w-]+"
}
],
"begin": "{{",
"name": "comment.tags.postcss",
"end": "}}"
},
"interpolation": {
"patterns": [
{
"include": "#variable"
},
{
"include": "#numeric"
},
{
"include": "#operator"
},
{
"include": "#unit"
},
{
"include": "#double-quoted"
},
{
"include": "#single-quoted"
}
],
"begin": "#{",
"name": "support.function.interpolation.postcss",
"end": "}"
},
"unit": {
"name": "keyword.other.unit.css.postcss",
"match": "(?<=[\\d]|})(ch|cm|deg|dpcm|dpi|dppx|em|ex|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vw|%)"
},
"function-content-var": {
"name": "variable.parameter.postcss",
"match": "(?<=var\\()[\\w-]+(?=\\))"
},
"dotdotdot": {
"name": "variable.other",
"match": "\\.{3}"
},
"variable": {
"name": "variable.parameter.postcss",
"match": "\\$[\\w-]+"
},
"single-quoted": {
"patterns": [
{
"include": "#quoted-interpolation"
}
],
"begin": "'",
"name": "string.quoted.single.css.postcss",
"end": "'"
},
"quoted-interpolation": {
"patterns": [
{
"include": "#variable"
},
{
"include": "#numeric"
},
{
"include": "#operator"
},
{
"include": "#unit"
}
],
"begin": "#{",
"name": "support.function.interpolation.postcss",
"end": "}"
},
"pseudo-class": {
"name": "entity.other.attribute-name.pseudo-class.css.postcss",
"match": ":[a-z:-]+"
},
"property-value": {
"name": "meta.property-value.css.postcss, support.constant.property-value.css.postcss",
"match": "[\\w-]+"
},
"placeholder-selector": {
"begin": "(?<!\\d)%(?!\\d)",
"name": "entity.other.attribute-name.placeholder-selector.postcss",
"end": "$\\n?|\\s|(?=;|{)"
},
"flag": {
"name": "keyword.other.important.css.postcss",
"match": "!(important|default|optional|global)"
},
"parent-selector": {
"name": "entity.name.tag.css.postcss",
"match": "&"
}
},
"foldingStartMarker": "/\\*|^#|^\\*|^\\b|^\\.",
"foldingStopMarker": "\\*/|^\\s*$",
"fileTypes": ["pcss", "postcss"],
"uuid": "90DAEA60-88AA-11E2-9E96-0800200C9A66",
"scopeName": "source.css.postcss"
}

View file

@ -0,0 +1,378 @@
{
"patterns": [
{
"patterns": [
{
"include": "#comment-tag"
}
],
"begin": "/\\*",
"name": "comment.block.sugarss",
"end": "\\*/"
},
{
"include": "#double-slash"
},
{
"include": "#double-quoted"
},
{
"include": "#single-quoted"
},
{
"include": "#interpolation"
},
{
"include": "#placeholder-selector"
},
{
"include": "#variable"
},
{
"include": "#variable-root-css"
},
{
"include": "#numeric"
},
{
"include": "#unit"
},
{
"include": "#flag"
},
{
"include": "#dotdotdot"
},
{
"captures": {
"0": {
"name": "keyword.control.at-rule.css.sugarss"
}
},
"begin": "@include",
"name": "support.function.name.sugarss.library",
"end": "(?=\\n|\\(|{)"
},
{
"captures": {
"0": {
"name": "keyword.control.at-rule.css.sugarss"
}
},
"patterns": [
{
"name": "entity.name.function",
"match": "[\\w-]+"
}
],
"begin": "@mixin|@function",
"name": "support.function.name.sugarss.no-completions",
"end": "$\\n?|(?=\\(|{)"
},
{
"name": "string.quoted.double.css.sugarss",
"match": "(?<=@import)\\s[\\w/.*-]+"
},
{
"begin": "@",
"name": "keyword.control.at-rule.css.sugarss",
"end": "$\\n?|\\s(?!(all|braille|embossed|handheld|print|projection|screen|speech|tty|tv|if|only|not)(\\s|,))"
},
{
"patterns": [
{
"include": "#interpolation"
},
{
"include": "#pseudo-class"
}
],
"begin": "#",
"name": "entity.other.attribute-name.id.css.sugarss",
"end": "$\\n?|(?=\\s|,|\\(|\\)|\\.|\\[|{|>)"
},
{
"patterns": [
{
"include": "#interpolation"
},
{
"include": "#pseudo-class"
}
],
"begin": "\\.|(?<=&)(-|_)",
"name": "entity.other.attribute-name.class.css.sugarss",
"end": "$\\n?|(?=\\s|,|\\(|\\)|\\[|{|>)"
},
{
"patterns": [
{
"include": "#double-quoted"
},
{
"include": "#single-quoted"
},
{
"name": "keyword.other.regex.sugarss",
"match": "\\^|\\$|\\*|~"
}
],
"begin": "\\[",
"name": "entity.other.attribute-selector.sugarss",
"end": "\\]"
},
{
"name": "entity.other.attribute-name.pseudo-class.css.sugarss",
"match": "(?<=\\]|\\)|not\\(|\\*|>|>\\s):[a-z:-]+|(::|:-)[a-z:-]+"
},
{
"patterns": [
{
"include": "#double-slash"
},
{
"include": "#double-quoted"
},
{
"include": "#single-quoted"
},
{
"include": "#interpolation"
},
{
"include": "#variable"
},
{
"include": "#rgb-value"
},
{
"include": "#numeric"
},
{
"include": "#unit"
},
{
"include": "#flag"
},
{
"include": "#function"
},
{
"include": "#function-content"
},
{
"include": "#function-content-var"
},
{
"include": "#operator"
},
{
"include": "#parent-selector"
},
{
"include": "#property-value"
}
],
"begin": ":",
"name": "meta.property-list.css.sugarss",
"end": "$\\n?|(?=\\s\\(|and\\(|{|}|\\),)"
},
{
"include": "#rgb-value"
},
{
"include": "#function"
},
{
"include": "#function-content"
},
{
"patterns": [
{
"include": "#interpolation"
},
{
"include": "#pseudo-class"
}
],
"begin": "(?<!\\-|\\()\\b(a|abbr|acronym|address|applet|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|embed|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|picture|pre|progress|q|samp|script|section|select|small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video|main|svg|rect|ruby|center|circle|ellipse|line|polyline|polygon|path|text|u|x)\\b(?!-|\\)|:\\s)|&",
"name": "entity.name.tag.css.sugarss.symbol",
"end": "(?=\\s|,|\\(|\\)|\\.|\\[|{|>|-|_)"
},
{
"include": "#operator"
},
{
"name": "support.type.property-name.css.sugarss",
"match": "[a-z-]+((?=:|#{))"
},
{
"include": "#reserved-words"
},
{
"include": "#property-value"
}
],
"name": "SugarSS",
"repository": {
"reserved-words": {
"name": "support.type.property-name.css.sugarss",
"match": "\\b(false|from|in|not|null|through|to|true)\\b"
},
"double-quoted": {
"patterns": [
{
"include": "#quoted-interpolation"
}
],
"begin": "\"",
"name": "string.quoted.double.css.sugarss",
"end": "\""
},
"operator": {
"name": "keyword.operator.sugarss",
"match": "\\+|\\s-\\s|\\s-(?=\\$)|(?<=\\()-(?=\\$)|\\s-(?=\\()|\\*|/|%|=|!|<|>|~"
},
"function-content": {
"name": "string.quoted.double.css.sugarss",
"match": "(?<=url\\(|format\\(|attr\\().+?(?=\\))"
},
"double-slash": {
"patterns": [
{
"include": "#comment-tag"
}
],
"begin": "//",
"name": "comment.line.sugarss",
"end": "$"
},
"numeric": {
"name": "constant.numeric.css.sugarss",
"match": "(-|\\.)?[0-9]+(\\.[0-9]+)?"
},
"variable-root-css": {
"name": "variable.parameter.sugarss",
"match": "(?<!&)--[\\w-]+"
},
"function": {
"name": "support.function.name.sugarss",
"match": "(?<=[\\s|\\(|,|:])(?!url|format|attr)[\\w-][\\w-]*(?=\\()"
},
"rgb-value": {
"name": "constant.other.color.rgb-value.css.sugarss",
"match": "(#)([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\\b"
},
"comment-tag": {
"patterns": [
{
"name": "comment.tag.sugarss",
"match": "[\\w-]+"
}
],
"begin": "{{",
"name": "comment.tags.sugarss",
"end": "}}"
},
"interpolation": {
"patterns": [
{
"include": "#variable"
},
{
"include": "#numeric"
},
{
"include": "#operator"
},
{
"include": "#unit"
},
{
"include": "#double-quoted"
},
{
"include": "#single-quoted"
}
],
"begin": "#{",
"name": "support.function.interpolation.sugarss",
"end": "}"
},
"unit": {
"name": "keyword.other.unit.css.sugarss",
"match": "(?<=[\\d]|})(ch|cm|deg|dpcm|dpi|dppx|em|ex|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vw|%)"
},
"function-content-var": {
"name": "variable.parameter.sugarss",
"match": "(?<=var\\()[\\w-]+(?=\\))"
},
"dotdotdot": {
"name": "variable.other",
"match": "\\.{3}"
},
"variable": {
"name": "variable.parameter.sugarss",
"match": "\\$[\\w-]+"
},
"single-quoted": {
"patterns": [
{
"include": "#quoted-interpolation"
}
],
"begin": "'",
"name": "string.quoted.single.css.sugarss",
"end": "'"
},
"quoted-interpolation": {
"patterns": [
{
"include": "#variable"
},
{
"include": "#numeric"
},
{
"include": "#operator"
},
{
"include": "#unit"
}
],
"begin": "#{",
"name": "support.function.interpolation.sugarss",
"end": "}"
},
"pseudo-class": {
"name": "entity.other.attribute-name.pseudo-class.css.sugarss",
"match": ":[a-z:-]+"
},
"property-value": {
"name": "meta.property-value.css.sugarss, support.constant.property-value.css.sugarss",
"match": "[\\w-]+"
},
"semicolon": {
"name": "invalid.illegal.bad-semicolon.css.sugarss",
"match": ";"
},
"placeholder-selector": {
"begin": "(?<!\\d)%(?!\\d)",
"name": "entity.other.attribute-name.placeholder-selector.sugarss",
"end": "$\\n?|\\s|(?={)"
},
"flag": {
"name": "keyword.other.important.css.sugarss",
"match": "!(important|default|optional|global)"
},
"parent-selector": {
"name": "entity.name.tag.css.sugarss",
"match": "&"
}
},
"foldingStartMarker": "/\\*|^#|^\\*|^\\b|^\\.",
"foldingStopMarker": "\\*/|^\\s*$",
"fileTypes": ["sss"],
"uuid": "BDAE4719-925F-433C-905A-CAE367D924AC",
"scopeName": "source.css.sugarss"
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,548 @@
# [PackageDev] target_format: plist, ext: tmLanguage
name: Vue
scopeName: source.vue
fileTypes: [vue]
uuid: 5512c10d-4cc5-434c-b8fc-53b912f55ab3
patterns:
# comment
- name: comment.block.html
begin: <!--
end: -->
captures:
'0': { name: punctuation.definition.comment.html }
# template - single line
# <template src="index.html" />
- begin: (<)(?=template.*[^/>]*/>\s*$)
beginCaptures:
'1': { name: punctuation.definition.tag.begin.html }
end: (/>)
endCaptures:
'1': { name: punctuation.definition.tag.end.html }
patterns:
- begin: (template)
beginCaptures:
'1': { name: entity.name.tag.template.html }
end: (?=/>)
patterns:
- include: '#tag-stuff'
# template - single line
# <template src="index.html"></template>
- begin: (<)(template)(?=[^>]*>[^/>]*</template>)
beginCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.template.html }
end: (</)(template)(>)
endCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.template.html }
'3': { name: punctuation.definition.tag.end.html }
patterns:
- include: '#tag-stuff'
- begin: (>)
beginCaptures:
'1': { name: punctuation.definition.tag.end.html }
end: (?=</template>)
# jade / pug
- begin: (<)(template)\b(?=[^>]*lang=('jade'|"jade"|'pug'|"pug"))(?![^/>]*/>\s*$)
beginCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.template.html }
end: (</)(template)(>)
endCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.template.html }
'3': { name: punctuation.definition.tag.end.html }
patterns:
- include: '#tag-stuff'
- contentName: text.pug
begin: (>)
beginCaptures:
'1': { name: punctuation.definition.tag.end.html }
end: (?=</template>)
patterns:
- include: text.pug
# haml
- begin: (<)(template)\b(?=[^>]*lang=('haml'|"haml"))(?![^/>]*/>\s*$)
beginCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.template.html }
end: (</)(template)(>)
endCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.template.html }
'3': { name: punctuation.definition.tag.end.html }
patterns:
- include: '#tag-stuff'
- contentName: text.haml
begin: (>)
beginCaptures:
'1': { name: punctuation.definition.tag.end.html }
end: (?=</template>)
patterns:
- include: text.haml
# slim
- begin: (<)(template)\b(?=[^>]*lang=('slim'|"slim"))(?![^/>]*/>\s*$)
beginCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.template.html }
end: (</)(template)(>)
endCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.template.html }
'3': { name: punctuation.definition.tag.end.html }
patterns:
- include: '#tag-stuff'
- contentName: text.slim
begin: (>)
beginCaptures:
'1': { name: punctuation.definition.tag.end.html }
end: (?=</template>)
patterns:
- include: text.slim
# slm
- begin: (<)(template)\b(?=[^>]*lang=('slm'|"slm"))(?![^/>]*/>\s*$)
beginCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.template.html }
end: (</)(template)(>)
endCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.template.html }
'3': { name: punctuation.definition.tag.end.html }
patterns:
- include: '#tag-stuff'
- contentName: text.jade.slm
begin: (>)
beginCaptures:
'1': { name: punctuation.definition.tag.end.html }
end: (?=</template>)
patterns:
- include: text.jade.slm
# liquid
- begin: (<)(template)\b(?=[^>]*lang=('liquid'|"liquid"))(?![^/>]*/>\s*$)
beginCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.template.html }
end: (</)(template)(>)
endCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.template.html }
'3': { name: punctuation.definition.tag.end.html }
patterns:
- include: '#tag-stuff'
- contentName: text.html.liquid
begin: (>)
beginCaptures:
'1': { name: punctuation.definition.tag.end.html }
end: (?=</template>)
patterns:
- include: text.html.liquid
# html
- begin: (<)(template)(?![^/>]*/>\s*$)
beginCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.template.html }
end: ^(</)(template)(>)
endCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.template.html }
'3': { name: punctuation.definition.tag.end.html }
patterns:
- include: '#tag-stuff'
- contentName: text.html.vue-html
begin: (>)
beginCaptures:
'1': { name: punctuation.definition.tag.end.html }
end: (?=^</template>)
patterns:
- include: text.html.vue-html
# style - single line
# <style src="index.css" />
- begin: (<)(style)\b(?=[^/>]*/>\s*$)
beginCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.style.html }
end: (/>)
endCaptures:
'1': { name: punctuation.definition.tag.end.html }
patterns:
- include: '#tag-stuff'
# style - single line
# <style src="index.css"></style>
- begin: (<)(style)(?=[^>]*>[^/>]*</style>)
beginCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.style.html }
end: (</)(style)(>)
endCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.style.html }
'3': { name: punctuation.definition.tag.end.html }
patterns:
- include: '#tag-stuff'
- begin: (>)
beginCaptures:
'1': { name: punctuation.definition.tag.end.html }
end: (?=</style>)
# sass / scss
- begin: (<)(style)\b(?=[^>]*lang=('sass'|"sass"))(?![^/>]*/>\s*$)
beginCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.style.html }
end: (</)(style)(>)
endCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.style.html }
'3': { name: punctuation.definition.tag.end.html }
patterns:
- include: '#tag-stuff'
- contentName: source.sass
begin: (>)
beginCaptures:
'1': { name: punctuation.definition.tag.end.html }
end: (?=</style>)
patterns:
- include: source.sass
- begin: (<)(style)\b(?=[^>]*lang=('scss'|"scss"))(?![^/>]*/>\s*$)
beginCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.style.html }
end: (</)(style)(>)
endCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.style.html }
'3': { name: punctuation.definition.tag.end.html }
patterns:
- include: '#tag-stuff'
- contentName: source.css.scss
begin: (>)
beginCaptures:
'1': { name: punctuation.definition.tag.end.html }
end: (?=</style>)
patterns:
- include: source.css.scss
# less
- begin: (<)(style)\b(?=[^>]*lang=('less'|"less"))(?![^/>]*/>\s*$)
beginCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.style.html }
end: (</)(style)(>)
endCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.style.html }
'3': { name: punctuation.definition.tag.end.html }
patterns:
- include: '#tag-stuff'
- contentName: source.css.less
begin: (>)
beginCaptures:
'1': { name: punctuation.definition.tag.end.html }
end: (?=</style>)
patterns:
- include: source.css.less
# stylus
- begin: (<)(style)\b(?=[^>]*lang=('stylus'|"stylus"))(?![^/>]*/>\s*$)
beginCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.style.html }
end: (</)(style)(>)
endCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.style.html }
'3': { name: punctuation.definition.tag.end.html }
patterns:
- include: '#tag-stuff'
- contentName: source.stylus
begin: (>)
beginCaptures:
'1': { name: punctuation.definition.tag.end.html }
end: (?=</style>)
patterns:
- include: source.stylus
# postcss
- begin: (<)(style)\b(?=[^>]*lang=('postcss'|"postcss"))(?![^/>]*/>\s*$)
beginCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.style.html }
end: (</)(style)(>)
endCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.style.html }
'3': { name: punctuation.definition.tag.end.html }
patterns:
- include: '#tag-stuff'
- contentName: source.css.postcss
begin: (>)
beginCaptures:
'1': { name: punctuation.definition.tag.end.html }
end: (?=</style>)
patterns:
- include: source.css.postcss
# sugarss
- begin: (<)(style)\b(?=[^>]*lang=(['"]sss['"]))(?![^/>]*/>\s*$)
beginCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.style.html }
end: (</)(style)(>)
endCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.style.html }
'3': { name: punctuation.definition.tag.end.html }
patterns:
- include: '#tag-stuff'
- contentName: source.css.sugarss
begin: (>)
beginCaptures:
'1': { name: punctuation.definition.tag.end.html }
end: (?=</style>)
patterns:
- include: source.css.sugarss
# css
- begin: (<)(style)(?![^/>]*/>\s*$)
beginCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.style.html }
end: (</)(style)(>)
endCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.style.html }
'3': { name: punctuation.definition.tag.end.html }
patterns:
- include: '#tag-stuff'
- contentName: source.css
begin: (>)
beginCaptures:
'1': { name: punctuation.definition.tag.end.html }
end: (?=</style>)
patterns:
- include: source.css
# script - single line
# <script src="index.js" />
- begin: (<)(script)\b(?=[^>]*/>$)
beginCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.script.html }
end: (/>)
endCaptures:
'1': { name: punctuation.definition.tag.end.html }
patterns:
- include: '#tag-stuff'
# script - single line
# <script src="index.js"></script>
- begin: (<)(script)(?=[^>]*>[^/>]*</script>)
beginCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.script.html }
end: (</)(script)(>)
endCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.script.html }
'3': { name: punctuation.definition.tag.end.html }
patterns:
- include: '#tag-stuff'
- begin: (>)
beginCaptures:
'1': { name: punctuation.definition.tag.end.html }
end: (?=</script>)
# ts
- begin: (<)(script)\b(?=[^>]*lang=('ts'|"ts"))(?![^/>]*/>\s*$)
beginCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.script.html }
end: (</)(script)(>)
endCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.script.html }
'3': { name: punctuation.definition.tag.end.html }
patterns:
- include: '#tag-stuff'
- contentName: source.ts
begin: (>)
beginCaptures:
'1': { name: punctuation.definition.tag.end.html }
end: (?=</script>)
patterns:
- include: source.ts
# coffee
- begin: (<)(script)\b(?=[^>]*lang=('coffee'|"coffee"))(?![^/>]*/>\s*$)
beginCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.script.html }
end: (</)(script)(>)
endCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.script.html }
'3': { name: punctuation.definition.tag.end.html }
patterns:
- include: '#tag-stuff'
- contentName: source.coffee
begin: (>)
beginCaptures:
'1': { name: punctuation.definition.tag.end.html }
end: (?=</script>)
patterns:
- include: source.coffee
# js
- begin: (<)(script)(?![^/>]*/>\s*$)
beginCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.script.html }
end: (</)(script)(>)
endCaptures:
'1': { name: punctuation.definition.tag.begin.html }
'2': { name: entity.name.tag.script.html }
'3': { name: punctuation.definition.tag.end.html }
patterns:
- include: '#tag-stuff'
- contentName: source.js
begin: (>)
beginCaptures:
'1': { name: punctuation.definition.tag.end.html }
end: (?=</script>)
patterns:
- include: source.js
# Repository
repository:
entities:
patterns:
- name: constant.character.entity.html
match: (&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)
captures:
'1': { name: punctuation.definition.entity.html }
'3': { name: punctuation.definition.entity.html }
- name: invalid.illegal.bad-ampersand.html
match: '&'
string-double-quoted:
name: string.quoted.double.html
begin: '"'
beginCaptures:
'0': { name: punctuation.definition.string.begin.html }
end: '"'
endCaptures:
'0': { name: punctuation.definition.string.end.html }
patterns:
- include: '#vue-interpolations'
- include: '#entities'
string-single-quoted:
name: string.quoted.single.html
begin: "'"
beginCaptures:
'0': { name: punctuation.definition.string.begin.html }
end: "'"
endCaptures:
'0': { name: punctuation.definition.string.end.html }
patterns:
- include: '#vue-interpolations'
- include: '#entities'
tag-generic-attribute:
name: entity.other.attribute-name.html
match: \b([a-zA-Z\-:_]+)
tag-id-attribute:
name: meta.attribute-with-value.id.html
begin: \b(id)\b\s*(=)
end: (?<='|")
captures:
'1': { name: entity.other.attribute-name.id.html }
'2': { name: punctuation.separator.key-value.html }
patterns:
- name: string.quoted.double.html
contentName: meta.toc-list.id.html
begin: '"'
beginCaptures:
'0': { name: punctuation.definition.string.begin.html }
end: '"'
endCaptures:
'0': { name: punctuation.definition.string.end.html }
patterns:
- include: '#vue-interpolations'
- include: '#entities'
- name: string.quoted.single.html
contentName: meta.toc-list.id.html
begin: "'"
beginCaptures:
'0': { name: punctuation.definition.string.begin.html }
end: "'"
endCaptures:
'0': { name: punctuation.definition.string.end.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:
name: meta.directive.vue
begin: (?:\b(v-)|(:|@|#))([a-zA-Z0-9\-_]+)(?:\:([a-zA-Z\-_]+))?(?:\.([a-zA-Z\-_]+))*\s*(=)
end: (?<='|")|(?=[\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 }
patterns:
- name: source.directive.vue
begin: '`'
beginCaptures:
'0': { name: punctuation.definition.string.begin.html }
end: '`'
endCaptures:
'0': { name: punctuation.definition.string.end.html }
patterns:
- include: source.js#expression
- name: source.directive.vue
begin: '"'
beginCaptures:
'0': { name: punctuation.definition.string.begin.html }
end: '"'
endCaptures:
'0': { name: punctuation.definition.string.end.html }
patterns:
- include: source.js#expression
- name: source.directive.vue
begin: "'"
beginCaptures:
'0': { name: punctuation.definition.string.begin.html }
end: "'"
endCaptures:
'0': { name: punctuation.definition.string.end.html }
patterns:
- include: source.js#expression
vue-interpolations:
patterns:
- name: expression.embedded.vue
begin: \{\{\{?
beginCaptures:
'0': { name: punctuation.definition.generic.begin.html }
end: \}\}\}?
endCaptures:
'0': { name: punctuation.definition.generic.end.html }
patterns:
- include: source.js#expression