added vscode extensions
This commit is contained in:
parent
7cde0829be
commit
26e2a50441
316 changed files with 37301 additions and 0 deletions
1
.vscode/extensions/johnsoncodehk.volar-0.27.21/.github/FUNDING.yml
vendored
Normal file
1
.vscode/extensions/johnsoncodehk.volar-0.27.21/.github/FUNDING.yml
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
github: johnsoncodehk
|
||||
23
.vscode/extensions/johnsoncodehk.volar-0.27.21/.github/workflows/test.yml
vendored
Normal file
23
.vscode/extensions/johnsoncodehk.volar-0.27.21/.github/workflows/test.yml
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
name: testing
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x, 14.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: npm i -g yarn
|
||||
- run: yarn
|
||||
- run: yarn compile
|
||||
- run: yarn test
|
||||
44
.vscode/extensions/johnsoncodehk.volar-0.27.21/.vsixmanifest
vendored
Normal file
44
.vscode/extensions/johnsoncodehk.volar-0.27.21/.vsixmanifest
vendored
Normal 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="volar" Version="0.27.21" Publisher="johnsoncodehk" />
|
||||
<DisplayName>Volar</DisplayName>
|
||||
<Description xml:space="preserve">Language support for Vue 3</Description>
|
||||
<Tags>volar,vue,vue3,ts,typescript,pug,__ext_vue</Tags>
|
||||
<Categories></Categories>
|
||||
<GalleryFlags>Public</GalleryFlags>
|
||||
<Badges></Badges>
|
||||
<Properties>
|
||||
<Property Id="Microsoft.VisualStudio.Code.Engine" Value="^1.58.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/johnsoncodehk/volar.git" />
|
||||
<Property Id="Microsoft.VisualStudio.Services.Links.Getstarted" Value="https://github.com/johnsoncodehk/volar.git" />
|
||||
|
||||
<Property Id="Microsoft.VisualStudio.Services.Links.GitHub" Value="https://github.com/johnsoncodehk/volar.git" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Property Id="Microsoft.VisualStudio.Services.GitHubFlavoredMarkdown" Value="true" />
|
||||
|
||||
|
||||
|
||||
</Properties>
|
||||
<License>extension/LICENSE.txt</License>
|
||||
<Icon>extension/images/icon.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/images/icon.png" Addressable="true" />
|
||||
</Assets>
|
||||
</PackageManifest>
|
||||
1269
.vscode/extensions/johnsoncodehk.volar-0.27.21/CHANGELOG.md
vendored
Normal file
1269
.vscode/extensions/johnsoncodehk.volar-0.27.21/CHANGELOG.md
vendored
Normal file
File diff suppressed because it is too large
Load diff
21
.vscode/extensions/johnsoncodehk.volar-0.27.21/LICENSE.txt
vendored
Normal file
21
.vscode/extensions/johnsoncodehk.volar-0.27.21/LICENSE.txt
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2021-present Johnson Chu
|
||||
|
||||
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.
|
||||
146
.vscode/extensions/johnsoncodehk.volar-0.27.21/README.md
vendored
Normal file
146
.vscode/extensions/johnsoncodehk.volar-0.27.21/README.md
vendored
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
# Volar
|
||||
|
||||
> ⚡ Fast Vue Language Support Extension
|
||||
|
||||
https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar
|
||||
|
||||
Volar is a Language Support plugin built specifically for Vue 3. It's based on [`@vue/reactivity`](https://www.npmjs.com/package/@vue/reactivity) to calculate everything on-demand, to implement native TypeScript language service level performance.
|
||||
|
||||
🛠️ This project is still in refactoring to make contributing easier.
|
||||
|
||||
[[Tips](https://github.com/johnsoncodehk/volar/issues/53)] [[Discord](https://discord.gg/5bnSSSSBbK)]
|
||||
|
||||
## Sponsors
|
||||
|
||||
Create a tool that can help many people it feels amazing! But maintain this project requires lot of time and energy, if you want to support the sustainability of this project, please consider becoming a sponsor, thank you. 🙏
|
||||
|
||||
This company is [sponsoring this project](https://github.com/sponsors/johnsoncodehk) to improve your DX. 💪
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="https://github.com/Leniolabs">
|
||||
<img itemprop="image" src="https://github.com/Leniolabs.png" width="100" height="100">
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<h3>Leniolabs_</h3>
|
||||
<p>Scale your Front-end development with our unique approach</p>
|
||||
<p>
|
||||
<a href="https://www.leniolabs.com/">https://www.leniolabs.com/</a>
|
||||
・<a href="https://twitter.com/Leniolabs_">@Leniolabs_</a>
|
||||
・<a href="mailto:info@leniolabs.com">info@leniolabs.com</a>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## Quick Start
|
||||
|
||||
- [create-vite](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-vue-ts)
|
||||
- [Vitesse](https://github.com/antfu/vitesse)
|
||||
- [volar-starter](https://github.com/johnsoncodehk/volar-starter) (For bug report and experiment features testing)
|
||||
|
||||
## Community's Language Client Implements
|
||||
|
||||
- coc.nvim: https://github.com/yaegassy/coc-volar ⚡
|
||||
- nvim: https://github.com/neovim/nvim-lspconfig
|
||||
- vim-lsp: https://github.com/mattn/vim-lsp-settings
|
||||
- Sublime: https://github.com/sublimelsp/LSP-volar
|
||||
|
||||
⚡ - This implement supported multiple server ([Affect](https://github.com/johnsoncodehk/volar/discussions/441#discussioncomment-1263173))
|
||||
|
||||
## By-product
|
||||
|
||||
- [@volar/server](https://www.npmjs.com/package/@volar/server): Bridging module for LSP <-> vscode-vue-languageservice.
|
||||
- [vue-tsc](https://github.com/johnsoncodehk/vue-tsc): Type-Checking on command line
|
||||
- [typescript-vue-plugin](https://www.npmjs.com/package/typescript-vue-plugin): See [#169](https://github.com/johnsoncodehk/volar/issues/169#issuecomment-832377254).
|
||||
- [vscode-vue-languageservice](https://www.npmjs.com/package/vscode-vue-languageservice) : Generic language server module for Vue
|
||||
- [vscode-pug-languageservice](https://www.npmjs.com/package/vscode-pug-languageservice): Generic language server module for Pug
|
||||
- [vscode-typescript-languageservice](https://www.npmjs.com/package/vscode-typescript-languageservice): Generic language server module for TypeScript
|
||||
|
||||
## Using
|
||||
|
||||
<details>
|
||||
<summary>Setup for Vue 2</summary>
|
||||
|
||||
1. Add `@vue/runtime-dom`
|
||||
|
||||
This extension required Vue 3 types from the `@vue/runtime-dom`.
|
||||
|
||||
Vue 3 in itself includes the package `@vue/runtime-dom`. For Vue 2 you will have to install this package yourself:
|
||||
|
||||
```jsonc
|
||||
// package.json
|
||||
{
|
||||
"devDependencies": {
|
||||
"@vue/runtime-dom": "latest"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. Remove `Vue.extend`
|
||||
|
||||
Template type-checking do not support with `Vue.extend`, you can use [composition-api](https://github.com/vuejs/composition-api), [vue-class-component](https://github.com/vuejs/vue-class-component), or `export default { ... }` instead of `export default Vue.extend`.
|
||||
|
||||
3. Support Vue 2 template
|
||||
|
||||
Volar preferentially supports Vue 3. Vue 3 and Vue 2 template has some different. You need to set the `experimentalCompatMode` option to support Vue 2 template.
|
||||
|
||||
```jsonc
|
||||
// tsconfig.json
|
||||
{
|
||||
"compilerOptions": {
|
||||
...
|
||||
},
|
||||
"vueCompilerOptions": {
|
||||
"experimentalCompatMode": 2
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Define Global Components</summary>
|
||||
|
||||
PR: https://github.com/vuejs/vue-next/pull/3399
|
||||
|
||||
Local components, Built-in components, native HTML elements Type-Checking is available with no configuration.
|
||||
|
||||
For Global components, you need to define `GlobalComponents` interface, for example:
|
||||
|
||||
```typescript
|
||||
// components.d.ts
|
||||
|
||||
// declare module '@vue/runtime-core' works for vue 3
|
||||
// declare module 'vue' works for vue2 + vue 3
|
||||
declare module 'vue' {
|
||||
export interface GlobalComponents {
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
}
|
||||
}
|
||||
|
||||
export {}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## Note
|
||||
|
||||
> You need to disable Vetur to avoid conflicts.
|
||||
|
||||
> Recommended use css / less / scss as `<style>` language, because these base on [vscode-css-languageservice](https://github.com/microsoft/vscode-css-languageservice) to provide reliable language support.
|
||||
>
|
||||
> If use postcss / stylus / sass, you need to install additional extension for syntax highlighting. I tried these and it works, you can also choose others.
|
||||
>
|
||||
> - postcss: [language-postcss](https://marketplace.visualstudio.com/items?itemName=cpylua.language-postcss).
|
||||
> - stylus: [language-stylus](https://marketplace.visualstudio.com/items?itemName=sysoev.language-stylus)
|
||||
> - sass: [Sass](https://marketplace.visualstudio.com/items?itemName=Syler.sass-indented)
|
||||
|
||||
> Please check https://vuejs.org/v2/guide/typescript.html#Recommended-Configuration for recommended tsconfig options.
|
||||
|
||||
> Volar does not include ESLint and Prettier, but the official [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) and [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) extensions support Vue, so you could install these yourself if needed.
|
||||
|
||||
> If using Vetur's [Customizable Scaffold Snippets](https://vuejs.github.io/vetur/guide/snippet.html#customizable-scaffold-snippets), recommend use [Snippet Generator](https://marketplace.visualstudio.com/items?itemName=wenfangdu.snippet-generator) convert to VSCode Snippets.
|
||||
BIN
.vscode/extensions/johnsoncodehk.volar-0.27.21/images/icon.png
vendored
Normal file
BIN
.vscode/extensions/johnsoncodehk.volar-0.27.21/images/icon.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
BIN
.vscode/extensions/johnsoncodehk.volar-0.27.21/images/preview-bg.png
vendored
Normal file
BIN
.vscode/extensions/johnsoncodehk.volar-0.27.21/images/preview-bg.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4 KiB |
BIN
.vscode/extensions/johnsoncodehk.volar-0.27.21/images/split-editors.png
vendored
Normal file
BIN
.vscode/extensions/johnsoncodehk.volar-0.27.21/images/split-editors.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
4
.vscode/extensions/johnsoncodehk.volar-0.27.21/jest.config.js
vendored
Normal file
4
.vscode/extensions/johnsoncodehk.volar-0.27.21/jest.config.js
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
/** @type {import('jest')} */
|
||||
module.exports = {
|
||||
preset: 'ts-jest',
|
||||
}
|
||||
49
.vscode/extensions/johnsoncodehk.volar-0.27.21/languages/vue-language-configuration.json
vendored
Normal file
49
.vscode/extensions/johnsoncodehk.volar-0.27.21/languages/vue-language-configuration.json
vendored
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
"comments": {
|
||||
"blockComment": [ "<!--", "-->" ]
|
||||
},
|
||||
"brackets": [
|
||||
["<!--", "-->"],
|
||||
["<", ">"],
|
||||
["{", "}"],
|
||||
["(", ")"]
|
||||
],
|
||||
"autoClosingPairs": [
|
||||
// html
|
||||
{ "open": "{", "close": "}"},
|
||||
{ "open": "[", "close": "]"},
|
||||
{ "open": "(", "close": ")" },
|
||||
{ "open": "'", "close": "'" },
|
||||
{ "open": "\"", "close": "\"" },
|
||||
{ "open": "<!--", "close": "-->", "notIn": [ "comment", "string" ]},
|
||||
// javascript
|
||||
{ "open": "`", "close": "`", "notIn": ["string", "comment"] },
|
||||
{ "open": "/**", "close": " */", "notIn": ["string"] }
|
||||
],
|
||||
"surroundingPairs": [
|
||||
{ "open": "'", "close": "'" },
|
||||
{ "open": "\"", "close": "\"" },
|
||||
{ "open": "{", "close": "}"},
|
||||
{ "open": "[", "close": "]"},
|
||||
{ "open": "(", "close": ")" },
|
||||
{ "open": "<", "close": ">" }
|
||||
],
|
||||
"colorizedBracketPairs": [
|
||||
// vue
|
||||
["{{", "}}"],
|
||||
// html
|
||||
["{", "}"],
|
||||
["(", ")"],
|
||||
// javascript
|
||||
["{", "}"],
|
||||
["[", "]"],
|
||||
["(", ")"]
|
||||
],
|
||||
"folding": {
|
||||
"markers": {
|
||||
"start": "^\\s*<!--\\s*#region\\b.*-->",
|
||||
"end": "^\\s*<!--\\s*#endregion\\b.*-->"
|
||||
}
|
||||
},
|
||||
"wordPattern": "(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\$\\^\\&\\*\\(\\)\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\s]+)"
|
||||
}
|
||||
7
.vscode/extensions/johnsoncodehk.volar-0.27.21/lerna.json
vendored
Normal file
7
.vscode/extensions/johnsoncodehk.volar-0.27.21/lerna.json
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"packages": [
|
||||
".",
|
||||
"packages/*"
|
||||
],
|
||||
"version": "0.27.21"
|
||||
}
|
||||
454
.vscode/extensions/johnsoncodehk.volar-0.27.21/package.json
vendored
Normal file
454
.vscode/extensions/johnsoncodehk.volar-0.27.21/package.json
vendored
Normal file
|
|
@ -0,0 +1,454 @@
|
|||
{
|
||||
"private": true,
|
||||
"name": "volar",
|
||||
"displayName": "Volar",
|
||||
"description": "Language support for Vue 3",
|
||||
"icon": "images/icon.png",
|
||||
"version": "0.27.21",
|
||||
"author": "johnsoncodehk",
|
||||
"publisher": "johnsoncodehk",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/johnsoncodehk/volar.git"
|
||||
},
|
||||
"engines": {
|
||||
"vscode": "^1.58.0"
|
||||
},
|
||||
"keywords": [
|
||||
"volar",
|
||||
"vue",
|
||||
"vue3",
|
||||
"ts",
|
||||
"typescript",
|
||||
"pug"
|
||||
],
|
||||
"activationEvents": [
|
||||
"onLanguage:vue",
|
||||
"onWebviewPanel:preview"
|
||||
],
|
||||
"main": "./node_modules/@volar/client/out/extension",
|
||||
"capabilities": {
|
||||
"untrustedWorkspaces": {
|
||||
"supported": "limited",
|
||||
"description": "%workspaceTrust%",
|
||||
"restrictedConfigurations": [
|
||||
"typescript.tsdk",
|
||||
"typescript.tsserver.pluginPaths",
|
||||
"typescript.npm"
|
||||
]
|
||||
}
|
||||
},
|
||||
"contributes": {
|
||||
"languages": [
|
||||
{
|
||||
"id": "vue",
|
||||
"extensions": [
|
||||
".vue"
|
||||
],
|
||||
"configuration": "./languages/vue-language-configuration.json"
|
||||
}
|
||||
],
|
||||
"breakpoints": [
|
||||
{
|
||||
"language": "vue"
|
||||
}
|
||||
],
|
||||
"configuration": {
|
||||
"type": "object",
|
||||
"title": "Volar",
|
||||
"properties": {
|
||||
"volar-api.trace.server": {
|
||||
"scope": "window",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"off",
|
||||
"messages",
|
||||
"verbose"
|
||||
],
|
||||
"default": "off",
|
||||
"description": "Traces the communication between VS Code and the language server."
|
||||
},
|
||||
"volar-document.trace.server": {
|
||||
"scope": "window",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"off",
|
||||
"messages",
|
||||
"verbose"
|
||||
],
|
||||
"default": "off",
|
||||
"description": "Traces the communication between VS Code and the language server."
|
||||
},
|
||||
"volar-html.trace.server": {
|
||||
"scope": "window",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"off",
|
||||
"messages",
|
||||
"verbose"
|
||||
],
|
||||
"default": "off",
|
||||
"description": "Traces the communication between VS Code and the language server."
|
||||
},
|
||||
"volar.lowPowerMode": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Using one language server to do the work of two language serves can reduce system resource usage, but features such as auto-complete will be much slower."
|
||||
},
|
||||
"volar.codeLens.references": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "[references] code lens."
|
||||
},
|
||||
"volar.codeLens.pugTools": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "[pug ☐] code lens."
|
||||
},
|
||||
"volar.formatting.printWidth": {
|
||||
"type": "number",
|
||||
"default": 100,
|
||||
"description": "HTML formatting print width."
|
||||
},
|
||||
"volar.icon.splitEditors": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Show split editor icon in title area of editor."
|
||||
},
|
||||
"volar.icon.preview": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "(Experimental) Show preview component icon in title area of editor."
|
||||
},
|
||||
"volar.icon.finder": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "(Experimental) Show code finder icon in title area of editor."
|
||||
},
|
||||
"volar.codeLens.scriptSetupTools": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "[ref sugar ☐] code lens."
|
||||
},
|
||||
"volar.autoCompleteRefs": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Auto-complete Ref value with `.value`."
|
||||
},
|
||||
"volar.takeOverBuiltinTsExtension": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "If built-in VSCode TypeScript Extension disabled, take over language support for *.ts."
|
||||
},
|
||||
"volar.tsPlugin": {
|
||||
"type": "boolean",
|
||||
"enum": [
|
||||
null,
|
||||
true,
|
||||
false
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"Don't care (Don't reload VSCode)",
|
||||
"Enable TS Plugin",
|
||||
"Disable TS Plugin"
|
||||
],
|
||||
"default": null,
|
||||
"description": "Enable Vue TS Server Plugin.\nSince TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type by default. In most cases, this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using manual `h(...)` calls), then you need to enable this setting."
|
||||
},
|
||||
"volar.tsPluginStatus": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Display TS Server Plugin status bar item."
|
||||
},
|
||||
"volar.checkVueTscVersion": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Check node_modules/vscode-vue-languageservice version when start extension."
|
||||
},
|
||||
"volar.preferredTagNameCase": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"auto",
|
||||
"both",
|
||||
"kebab",
|
||||
"pascal"
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"Auto Detect from Content",
|
||||
"<kebab-case> and <PascalCase>",
|
||||
"<kebab-case>",
|
||||
"<PascalCase>"
|
||||
],
|
||||
"default": "auto",
|
||||
"description": "Preferred tag name case."
|
||||
},
|
||||
"volar.preferredAttrNameCase": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"auto-kebab",
|
||||
"auto-camel",
|
||||
"kebab",
|
||||
"camel"
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"Auto Detect from Content (Preferred :kebab-case=\"...\")",
|
||||
"Auto Detect from Content (Preferred :camelCase=\"...\")",
|
||||
":kebab-case=\"...\"",
|
||||
":camelCase=\"...\""
|
||||
],
|
||||
"default": "auto-kebab",
|
||||
"description": "Preferred attr name case."
|
||||
},
|
||||
"volar.preview.port": {
|
||||
"type": "number",
|
||||
"default": 3333,
|
||||
"description": "Default port for component preview server."
|
||||
},
|
||||
"volar.preview.backgroundColor": {
|
||||
"type": "string",
|
||||
"default": "#fff",
|
||||
"description": "Component preview background color."
|
||||
},
|
||||
"volar.preview.transparentGrid": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Component preview background style."
|
||||
}
|
||||
}
|
||||
},
|
||||
"grammars": [
|
||||
{
|
||||
"language": "vue",
|
||||
"scopeName": "source.vue",
|
||||
"path": "./syntaxes/vue.tmLanguage.json",
|
||||
"embeddedLanguages": {
|
||||
"source.vue": "vue",
|
||||
"text": "plaintext",
|
||||
"text.html.derivative": "html",
|
||||
"text.html.markdown": "markdown",
|
||||
"text.pug": "jade",
|
||||
"source.css": "css",
|
||||
"source.css.scss": "scss",
|
||||
"source.css.less": "less",
|
||||
"source.sass": "sass",
|
||||
"source.stylus": "stylus",
|
||||
"source.postcss": "postcss",
|
||||
"source.js": "javascript",
|
||||
"source.ts": "typescript",
|
||||
"source.jsx": "javascriptreact",
|
||||
"source.tsx": "typescriptreact",
|
||||
"source.json": "json",
|
||||
"source.json.comments": "jsonc",
|
||||
"source.yaml": "yaml",
|
||||
"source.graphql": "graphql"
|
||||
}
|
||||
}
|
||||
],
|
||||
"semanticTokenScopes": [
|
||||
{
|
||||
"language": "vue",
|
||||
"scopes": {
|
||||
"property": [
|
||||
"variable.other.property.vue"
|
||||
],
|
||||
"property.readonly": [
|
||||
"variable.other.constant.property.vue"
|
||||
],
|
||||
"variable": [
|
||||
"variable.other.readwrite.vue"
|
||||
],
|
||||
"variable.readonly": [
|
||||
"variable.other.constant.object.vue"
|
||||
],
|
||||
"function": [
|
||||
"entity.name.function.vue"
|
||||
],
|
||||
"namespace": [
|
||||
"entity.name.type.module.vue"
|
||||
],
|
||||
"variable.defaultLibrary": [
|
||||
"support.variable.vue"
|
||||
],
|
||||
"function.defaultLibrary": [
|
||||
"support.function.vue"
|
||||
],
|
||||
"componentTag": [
|
||||
"support.class.component.vue"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"commands": [
|
||||
{
|
||||
"command": "volar.action.restartServer",
|
||||
"title": "Restart Vue server",
|
||||
"category": "Volar"
|
||||
},
|
||||
{
|
||||
"command": "volar.action.verifyAllScripts",
|
||||
"title": "Verify All Scripts",
|
||||
"category": "Volar"
|
||||
},
|
||||
{
|
||||
"command": "volar.action.writeTemplateLsVirtualFiles",
|
||||
"title": "Write Template LS Virtual Files",
|
||||
"category": "Volar (Debug)"
|
||||
},
|
||||
{
|
||||
"command": "volar.action.writeScriptLsVirtualFiles",
|
||||
"title": "Write Script LS Virtual Files",
|
||||
"category": "Volar (Debug)"
|
||||
},
|
||||
{
|
||||
"command": "volar.action.genWhitelist",
|
||||
"title": "Generate .vscodeignore Whitelist",
|
||||
"category": "Volar (Debug)"
|
||||
},
|
||||
{
|
||||
"command": "volar.action.showCallGraph",
|
||||
"title": "Show Call Graph",
|
||||
"category": "Volar (Experimental)"
|
||||
},
|
||||
{
|
||||
"command": "volar.action.splitEditors",
|
||||
"title": "Split <script>, <template>, <style> Editors",
|
||||
"category": "Volar",
|
||||
"icon": "images/split-editors.png"
|
||||
},
|
||||
{
|
||||
"command": "volar.action.finder",
|
||||
"title": "Open Code Finder (WebView)",
|
||||
"category": "Volar (Experimental)",
|
||||
"icon": "$(search)"
|
||||
},
|
||||
{
|
||||
"command": "volar.action.preview",
|
||||
"title": "Open Component Preview",
|
||||
"category": "Volar (Experimental)",
|
||||
"icon": "$(open-preview)"
|
||||
},
|
||||
{
|
||||
"command": "volar.action.toggleTsPlugin",
|
||||
"title": "Switch TS Plugin on / off",
|
||||
"category": "Volar"
|
||||
},
|
||||
{
|
||||
"command": "volar.action.tagNameCase",
|
||||
"title": "Change Tag Name Case",
|
||||
"category": "Volar"
|
||||
},
|
||||
{
|
||||
"command": "volar.action.tagNameCase.convertToKebabCase",
|
||||
"title": "Convert Tag Name Case to kebab-case",
|
||||
"category": "Volar"
|
||||
},
|
||||
{
|
||||
"command": "volar.action.tagNameCase.convertToPascalCase",
|
||||
"title": "Convert Tag Name Case to PascalCase",
|
||||
"category": "Volar"
|
||||
},
|
||||
{
|
||||
"command": "volar.action.attrNameCase",
|
||||
"title": "Change Attr Name Case",
|
||||
"category": "Volar"
|
||||
},
|
||||
{
|
||||
"command": "volar.action.createWorkspaceSnippets",
|
||||
"title": "Create Workspace Snippets",
|
||||
"category": "Volar"
|
||||
},
|
||||
{
|
||||
"command": "volar.action.selectElement",
|
||||
"title": "Select Element",
|
||||
"category": "Volar",
|
||||
"icon": "$(search)"
|
||||
},
|
||||
{
|
||||
"command": "volar.action.showInBrowser",
|
||||
"title": "Show in Browser",
|
||||
"category": "Volar",
|
||||
"icon": "$(browser)"
|
||||
},
|
||||
{
|
||||
"command": "workbench.action.webview.reloadWebviewAction",
|
||||
"title": "Refresh",
|
||||
"category": "Volar",
|
||||
"icon": "$(refresh)"
|
||||
},
|
||||
{
|
||||
"command": "volar.selectTypeScriptVersion",
|
||||
"title": "Select TypeScript Version...",
|
||||
"category": "Volar"
|
||||
}
|
||||
],
|
||||
"menus": {
|
||||
"editor/title": [
|
||||
{
|
||||
"command": "volar.action.splitEditors",
|
||||
"when": "editorLangId == vue && config.volar.icon.splitEditors",
|
||||
"group": "navigation"
|
||||
},
|
||||
{
|
||||
"command": "volar.action.preview",
|
||||
"when": "editorLangId == vue && config.volar.icon.preview",
|
||||
"group": "navigation"
|
||||
},
|
||||
{
|
||||
"command": "volar.action.finder",
|
||||
"when": "editorLangId == vue && config.volar.icon.finder",
|
||||
"group": "navigation"
|
||||
},
|
||||
{
|
||||
"command": "volar.action.selectElement",
|
||||
"when": "activeEditor == WebviewEditor && volar.showSelectElement",
|
||||
"group": "navigation"
|
||||
},
|
||||
{
|
||||
"command": "volar.action.showInBrowser",
|
||||
"when": "activeEditor == WebviewEditor",
|
||||
"group": "navigation"
|
||||
},
|
||||
{
|
||||
"command": "workbench.action.webview.reloadWebviewAction",
|
||||
"when": "activeEditor == WebviewEditor",
|
||||
"group": "navigation"
|
||||
}
|
||||
]
|
||||
},
|
||||
"typescriptServerPlugins-off": [
|
||||
{
|
||||
"name": "typescript-vue-plugin",
|
||||
"enableForWorkspaceTypeScriptVersions": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"vscode:prepublish": "npm run compile",
|
||||
"compile": "tsc -b tsconfig.build.json",
|
||||
"watch": "tsc -b tsconfig.build.json -w",
|
||||
"pack": "yarn && npm run test && vsce package --yarn",
|
||||
"publish": "yarn && npm run test && lerna publish --yes && vsce publish --yarn",
|
||||
"pretest": "cd packages/vscode-vue-languageservice/testCases && yarn",
|
||||
"test": "jest"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "latest",
|
||||
"jest": "latest",
|
||||
"lerna": "latest",
|
||||
"ts-jest": "latest",
|
||||
"typescript": "latest",
|
||||
"vsce": "latest"
|
||||
},
|
||||
"resolutions": {
|
||||
"to-vfile": "7.1.0"
|
||||
},
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
],
|
||||
"__metadata": {
|
||||
"id": "a5223b43-8621-4351-a14e-3d560f85f277",
|
||||
"publisherId": "71f82d11-e592-4a4d-aca2-05045784d2d0",
|
||||
"publisherDisplayName": "Johnson Chu",
|
||||
"installedTimestamp": 1631971900661
|
||||
}
|
||||
}
|
||||
988
.vscode/extensions/johnsoncodehk.volar-0.27.21/syntaxes/vue.tmLanguage.json
vendored
Normal file
988
.vscode/extensions/johnsoncodehk.volar-0.27.21/syntaxes/vue.tmLanguage.json
vendored
Normal file
|
|
@ -0,0 +1,988 @@
|
|||
{
|
||||
"name": "Vue",
|
||||
"scopeName": "source.vue",
|
||||
"injections": {
|
||||
"L:meta.tag.metadata": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#vue-directives"
|
||||
}
|
||||
]
|
||||
},
|
||||
"L:meta.tag.structure": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#vue-directives"
|
||||
}
|
||||
]
|
||||
},
|
||||
"L:meta.tag.inline": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#vue-directives"
|
||||
}
|
||||
]
|
||||
},
|
||||
"L:meta.tag.object": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#vue-directives"
|
||||
}
|
||||
]
|
||||
},
|
||||
"L:meta.tag.other": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#vue-directives"
|
||||
}
|
||||
]
|
||||
},
|
||||
"L:meta.tag.custom": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#vue-directives"
|
||||
}
|
||||
]
|
||||
},
|
||||
"L:text.pug -comment -string.comment": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#vue-interpolations"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "text.html.basic#comment"
|
||||
},
|
||||
{
|
||||
"include": "#self-closing-tag"
|
||||
},
|
||||
{
|
||||
"begin": "(<)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.end.html.vue"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*['\"]md['\"])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "entity.name.tag.$1.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(</)(\\1)\\s*(?=>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html.vue"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.$2.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "text.html.markdown",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
},
|
||||
{
|
||||
"include": "text.html.markdown"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*['\"]html['\"])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "entity.name.tag.$1.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(</)(\\1)\\s*(?=>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html.vue"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.$2.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "text.html.derivative",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
},
|
||||
{
|
||||
"include": "#html-stuff"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*['\"]pug['\"])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "entity.name.tag.$1.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(</)(\\1)\\s*(?=>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html.vue"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.$2.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "text.pug",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
},
|
||||
{
|
||||
"include": "text.pug"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*['\"]stylus['\"])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "entity.name.tag.$1.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(</)(\\1)\\s*(?=>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html.vue"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.$2.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "source.stylus",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
},
|
||||
{
|
||||
"include": "source.stylus"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*['\"]postcss['\"])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "entity.name.tag.$1.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(</)(\\1)\\s*(?=>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html.vue"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.$2.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "source.postcss",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
},
|
||||
{
|
||||
"include": "source.postcss"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*['\"]sass['\"])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "entity.name.tag.$1.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(</)(\\1)\\s*(?=>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html.vue"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.$2.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "source.sass",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
},
|
||||
{
|
||||
"include": "source.sass"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*['\"]css['\"])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "entity.name.tag.$1.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(</)(\\1)\\s*(?=>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html.vue"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.$2.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "source.css",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
},
|
||||
{
|
||||
"include": "source.css"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*['\"]scss['\"])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "entity.name.tag.$1.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(</)(\\1)\\s*(?=>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html.vue"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.$2.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "source.css.scss",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
},
|
||||
{
|
||||
"include": "source.css.scss"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*['\"]less['\"])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "entity.name.tag.$1.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(</)(\\1)\\s*(?=>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html.vue"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.$2.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "source.css.less",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
},
|
||||
{
|
||||
"include": "source.css.less"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*['\"]js['\"])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "entity.name.tag.$1.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(</)(\\1)\\s*(?=>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html.vue"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.$2.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "source.js",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
},
|
||||
{
|
||||
"include": "source.js"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*['\"]ts['\"])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "entity.name.tag.$1.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(</)(\\1)\\s*(?=>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html.vue"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.$2.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "source.ts",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
},
|
||||
{
|
||||
"include": "source.ts"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*['\"]jsx['\"])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "entity.name.tag.$1.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(</)(\\1)\\s*(?=>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html.vue"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.$2.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "source.js.jsx",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
},
|
||||
{
|
||||
"include": "source.js.jsx"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*['\"]tsx['\"])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "entity.name.tag.$1.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(</)(\\1)\\s*(?=>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html.vue"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.$2.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "source.tsx",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
},
|
||||
{
|
||||
"include": "source.tsx"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*['\"]json['\"])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "entity.name.tag.$1.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(</)(\\1)\\s*(?=>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html.vue"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.$2.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "source.json",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
},
|
||||
{
|
||||
"include": "source.json"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*['\"]jsonc['\"])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "entity.name.tag.$1.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(</)(\\1)\\s*(?=>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html.vue"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.$2.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "source.json.comments",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
},
|
||||
{
|
||||
"include": "source.json.comments"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*['\"]yaml['\"])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "entity.name.tag.$1.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(</)(\\1)\\s*(?=>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html.vue"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.$2.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "source.yaml",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
},
|
||||
{
|
||||
"include": "source.yaml"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*['\"](gql|graphql)['\"])",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "entity.name.tag.$1.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(</)(\\1)\\s*(?=>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html.vue"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.$2.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "source.graphql",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
},
|
||||
{
|
||||
"include": "source.graphql"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(template)\\b",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "entity.name.tag.$1.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(</)(\\1)\\s*(?=>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html.vue"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.$2.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "text.html.derivative",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
},
|
||||
{
|
||||
"include": "#html-stuff"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(script)\\b",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "entity.name.tag.$1.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(</)(\\1)\\s*(?=>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html.vue"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.$2.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "source.js",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
},
|
||||
{
|
||||
"include": "source.js"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(style)\\b",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "entity.name.tag.$1.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(</)(\\1)\\s*(?=>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html.vue"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.$2.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "source.css",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
},
|
||||
{
|
||||
"include": "source.css"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "([a-zA-Z0-9:-]+)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "entity.name.tag.$1.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(</)(\\1)\\s*(?=>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html.vue"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.$2.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "text",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"self-closing-tag": {
|
||||
"begin": "(<)([a-zA-Z0-9:-]+)(?=([^>]+/>))",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html.vue"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.$2.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(?<=/>)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
}
|
||||
]
|
||||
},
|
||||
"template-tag": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#template-tag-1"
|
||||
},
|
||||
{
|
||||
"include": "#template-tag-2"
|
||||
}
|
||||
]
|
||||
},
|
||||
"template-tag-1": {
|
||||
"begin": "(<)(template)\\b(>)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html.vue"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.$2.html.vue"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.definition.tag.end.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(/?>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.end.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "meta.template-tag.start",
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "\\G",
|
||||
"end": "(?=/>)|((</)(template)\\b)",
|
||||
"endCaptures": {
|
||||
"2": {
|
||||
"name": "punctuation.definition.tag.begin.html.vue"
|
||||
},
|
||||
"3": {
|
||||
"name": "entity.name.tag.$3.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "meta.template-tag.end",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#html-stuff"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"template-tag-2": {
|
||||
"begin": "(<)(template)\\b",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html.vue"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.$2.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(/?>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.end.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "meta.template-tag.start",
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "\\G",
|
||||
"end": "(?=/>)|((</)(template)\\b)",
|
||||
"endCaptures": {
|
||||
"2": {
|
||||
"name": "punctuation.definition.tag.begin.html.vue"
|
||||
},
|
||||
"3": {
|
||||
"name": "entity.name.tag.$3.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "meta.template-tag.end",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
},
|
||||
{
|
||||
"include": "#html-stuff"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"html-stuff": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#vue-interpolations"
|
||||
},
|
||||
{
|
||||
"include": "#template-tag"
|
||||
},
|
||||
{
|
||||
"include": "text.html.basic"
|
||||
}
|
||||
]
|
||||
},
|
||||
"tag-stuff": {
|
||||
"begin": "\\G",
|
||||
"end": "(?=/>)|(>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.end.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "meta.tag-stuff",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#vue-directives"
|
||||
},
|
||||
{
|
||||
"include": "text.html.basic#attribute"
|
||||
}
|
||||
]
|
||||
},
|
||||
"vue-directives": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#vue-directives-control"
|
||||
},
|
||||
{
|
||||
"include": "#vue-directives-style-attr"
|
||||
},
|
||||
{
|
||||
"include": "#vue-directives-original"
|
||||
}
|
||||
]
|
||||
},
|
||||
"vue-directives-original": {
|
||||
"begin": "(?:\\b(v-)|(:|@|#))([a-zA-Z0-9\\-_]*)(?:\\:([a-zA-Z\\-_]+))?(?:\\.([a-zA-Z\\-_]+))*\\s*(=)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "entity.other.attribute-name.html.vue"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.separator.key-value.html.vue"
|
||||
},
|
||||
"3": {
|
||||
"name": "entity.other.attribute-name.html.vue"
|
||||
},
|
||||
"4": {
|
||||
"name": "entity.other.attribute-name.html.vue"
|
||||
},
|
||||
"5": {
|
||||
"name": "entity.other.attribute-name.html.vue"
|
||||
},
|
||||
"6": {
|
||||
"name": "entity.other.attribute-name.html.vue"
|
||||
},
|
||||
"7": {
|
||||
"name": "punctuation.separator.key-value.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(?<='|\")",
|
||||
"name": "meta.directive.vue",
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "('|\")",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.string.begin.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(\\1)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.string.end.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "source.js.embedded.html.vue",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.js"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"vue-directives-control": {
|
||||
"begin": "(v-for)|(v-if|v-else-if|v-else)(?![\\w:-])",
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "keyword.control.loop.vue"
|
||||
},
|
||||
"1": {
|
||||
"name": "keyword.control.conditional.vue"
|
||||
}
|
||||
},
|
||||
"end": "(?=\\s*+[^=\\s])",
|
||||
"name": "meta.directive.vue",
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "=",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.separator.key-value.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(?<=[^\\s=])(?!\\s*=)|(?=/?>)",
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "('|\")",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.string.begin.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(\\1)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.string.end.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "source.js.embedded.html.vue",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.js"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"vue-directives-style-attr": {
|
||||
"begin": "\\b(style)\\s*(=)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "entity.other.attribute-name.html.vue"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.separator.key-value.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(?<='|\")",
|
||||
"name": "meta.directive.vue",
|
||||
"patterns": [
|
||||
{
|
||||
"comment": "Copy from source.css#rule-list-innards",
|
||||
"begin": "('|\")",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.string.begin.html.vue"
|
||||
}
|
||||
},
|
||||
"end": "(\\1)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.string.end.html.vue"
|
||||
}
|
||||
},
|
||||
"name": "source.css.embedded.html.vue",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.css#comment-block"
|
||||
},
|
||||
{
|
||||
"include": "source.css#escapes"
|
||||
},
|
||||
{
|
||||
"include": "source.css#font-features"
|
||||
},
|
||||
{
|
||||
"match": "(?x) (?<![\\w-])\n--\n(?:[-a-zA-Z_] | [^\\x00-\\x7F]) # First letter\n(?:[-a-zA-Z0-9_] | [^\\x00-\\x7F] # Remainder of identifier\n |\\\\(?:[0-9a-fA-F]{1,6}|.)\n)*",
|
||||
"name": "variable.css"
|
||||
},
|
||||
{
|
||||
"begin": "(?<![-a-zA-Z])(?=[-a-zA-Z])",
|
||||
"end": "$|(?![-a-zA-Z])",
|
||||
"name": "meta.property-name.css",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.css#property-names"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"comment": "Modify end to fix #199. TODO: handle ' character.",
|
||||
"begin": "(:)\\s*",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.separator.key-value.css"
|
||||
}
|
||||
},
|
||||
"end": "\\s*(;)|\\s*(?=\")",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.terminator.rule.css"
|
||||
}
|
||||
},
|
||||
"contentName": "meta.property-value.css",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.css#comment-block"
|
||||
},
|
||||
{
|
||||
"include": "source.css#property-values"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"match": ";",
|
||||
"name": "punctuation.terminator.rule.css"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"vue-interpolations": {
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "\\{\\{",
|
||||
"beginCaptures": [
|
||||
{
|
||||
"name": "punctuation.definition.tag.begin.html.vue"
|
||||
}
|
||||
],
|
||||
"end": "\\}\\}",
|
||||
"endCaptures": [
|
||||
{
|
||||
"name": "punctuation.definition.tag.end.html.vue"
|
||||
}
|
||||
],
|
||||
"name": "expression.embbeded.vue",
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "\\G",
|
||||
"end": "(?=\\}\\})",
|
||||
"name": "source.js.embedded.html.vue",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.js"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
91
.vscode/extensions/johnsoncodehk.volar-0.27.21/templates/vue.code-snippets
vendored
Normal file
91
.vscode/extensions/johnsoncodehk.volar-0.27.21/templates/vue.code-snippets
vendored
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
{
|
||||
// Place your snippets for vue here. Each snippet is defined under a snippet name and has a prefix, body and
|
||||
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
|
||||
// $1, $2 for tab stops, $0 for the final cursor position, and \${1:label}, \${2:another} for placeholders. Placeholders with the
|
||||
// same ids are connected.
|
||||
// Example:
|
||||
// "template": {
|
||||
// "scope": "vue",
|
||||
// "prefix": "template",
|
||||
// "body": [
|
||||
// "<template>",
|
||||
// " $1",
|
||||
// "</template>"
|
||||
// ],
|
||||
// "description": "Create <template> block"
|
||||
// },
|
||||
// "script": {
|
||||
// "scope": "vue",
|
||||
// "prefix": "script",
|
||||
// "body": [
|
||||
// "<script lang=\"ts\">",
|
||||
// "import { defineComponent } from 'vue';",
|
||||
// "",
|
||||
// "export default defineComponent({",
|
||||
// " $2",
|
||||
// "});",
|
||||
// "</script>"
|
||||
// ],
|
||||
// "description": "Create <script> block"
|
||||
// },
|
||||
// "script setup": {
|
||||
// "scope": "vue",
|
||||
// "prefix": "script setup",
|
||||
// "body": [
|
||||
// "<script lang=\"ts\" setup>",
|
||||
// "defineProps<{ $1 }>();",
|
||||
// "</script>"
|
||||
// ],
|
||||
// "description": "Create <script setup> + <script> blocks"
|
||||
// },
|
||||
// "style": {
|
||||
// "scope": "vue",
|
||||
// "prefix": "style",
|
||||
// "body": [
|
||||
// "<style lang=\"scss\" scoped>",
|
||||
// "$1",
|
||||
// "</style>"
|
||||
// ],
|
||||
// "description": "Create <style> block"
|
||||
// },
|
||||
// "v-for": {
|
||||
// "scope": "html",
|
||||
// "prefix": "v-for",
|
||||
// "body": [
|
||||
// "<template v-for=\"$1 in $2\">",
|
||||
// " $3",
|
||||
// "</template>"
|
||||
// ],
|
||||
// "description": "Create html tag with v-for"
|
||||
// },
|
||||
// "v-if": {
|
||||
// "scope": "html",
|
||||
// "prefix": "v-if",
|
||||
// "body": [
|
||||
// "<template v-if=\"$1\">",
|
||||
// " $2",
|
||||
// "</template>"
|
||||
// ],
|
||||
// "description": "Create html tag with v-if"
|
||||
// },
|
||||
// "v-else-if": {
|
||||
// "scope": "html",
|
||||
// "prefix": "v-else-if",
|
||||
// "body": [
|
||||
// "<template v-else-if=\"$1\">",
|
||||
// " $2",
|
||||
// "</template>"
|
||||
// ],
|
||||
// "description": "Create html tag with v-else-if"
|
||||
// },
|
||||
// "v-else": {
|
||||
// "scope": "html",
|
||||
// "prefix": "v-else",
|
||||
// "body": [
|
||||
// "<template v-else>",
|
||||
// " $2",
|
||||
// "</template>"
|
||||
// ],
|
||||
// "description": "Create html tag with v-else"
|
||||
// }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue