Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(vscode): rewrite with reactive-vscode #4945

Merged
merged 13 commits into from
Oct 30, 2024
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ node_modules
.vscode-test-web
extensions/*/meta.json
extensions/*/stats.html
extensions/vscode/src/generated-meta.ts

packages/*/*.d.ts
packages/*/*.js
Expand Down
48 changes: 48 additions & 0 deletions extensions/vscode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,3 +254,51 @@ Finally you need to make VS Code recognize your new extension and automatically
- [angular](https://github.com/angular/angular) shows how TS server plugin working with language service.
- Syntax highlight is rewritten base on [vue-syntax-highlight](https://github.com/vuejs/vue-syntax-highlight).
- [vscode-fenced-code-block-grammar-injection-example](https://github.com/mjbvz/vscode-fenced-code-block-grammar-injection-example) shows how to inject vue syntax highlight to markdown.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following content is automatically generated via vscode-ext-gen

## Commands

<!-- commands -->

| Command | Title |
| ------------------------------ | ------------------------------------------------- |
| `vue.action.restartServer` | Vue: Restart Vue and TS servers |
| `vue.action.doctor` | Vue: Doctor |
| `vue.action.writeVirtualFiles` | Vue (Debug): Write Virtual Files |
| `vue.action.splitEditors` | Vue: Split <script>, <template>, <style> Editors |
| `vue.findAllFileReferences` | Vue: Find File References via Vue Language Server |

<!-- commands -->

## Configs

<!-- configs -->

| Key | Description | Type | Default |
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------- | ----------------------------------- |
| `vue.trace.server` | Traces the communication between VS Code and the language server. | `string` | `"off"` |
| `vue.server.hybridMode` | Vue language server only handles CSS and HTML language support, and tsserver takes over TS language support via TS plugin. | `boolean,string` | `"auto"` |
| `vue.server.includeLanguages` | | `array` | `["vue"]` |
| `vue.server.maxOldSpaceSize` | Set --max-old-space-size option on server process. If you have problem on frequently "Request textDocument/** failed." error, try setting higher memory(MB) on it. | `number,null` | `null` |
| `vue.doctor.status` | Show known problems in status bar. | `boolean` | `true` |
| `vue.splitEditors.icon` | Show split editor icon in title area of editor. | `boolean` | `false` |
| `vue.splitEditors.layout.left` | | `array` | `["script","scriptSetup","styles"]` |
| `vue.splitEditors.layout.right` | | `array` | `["template","customBlocks"]` |
| `vue.updateImportsOnFileMove.enabled` | Enabled update imports on file move. | `boolean` | `true` |
| `vue.codeActions.enabled` | Enabled code actions. | `boolean` | `true` |
| `vue.codeActions.askNewComponentName` | Ask for new component name when extract component. | `boolean` | `true` |
| `vue.codeLens.enabled` | Enabled code lens. | `boolean` | `true` |
| `vue.complete.casing.tags` | Preferred tag name case. | `string` | `"autoPascal"` |
| `vue.complete.casing.props` | Preferred attr name case. | `string` | `"autoKebab"` |
| `vue.autoInsert.dotValue` | Auto-complete Ref value with `.value`. | `boolean` | `false` |
| `vue.autoInsert.bracketSpacing` | Auto add space between double curly brackets: {{|}} -> {{ | }} | `boolean` | `true` |
| `vue.inlayHints.destructuredProps` | Show inlay hints for destructured props. | `boolean` | `false` |
| `vue.inlayHints.missingProps` | Show inlay hints for missing required props. | `boolean` | `false` |
| `vue.inlayHints.inlineHandlerLeading` | Show inlay hints for event argument in inline handlers. | `boolean` | `false` |
| `vue.inlayHints.optionsWrapper` | Show inlay hints for component options wrapper for type support. | `boolean` | `false` |
| `vue.inlayHints.vBindShorthand` | Show inlay hints for v-bind shorthand. | `boolean` | `false` |
| `vue.format.template.initialIndent` | | `boolean` | `true` |
| `vue.format.style.initialIndent` | | `boolean` | `false` |
| `vue.format.script.initialIndent` | | `boolean` | `false` |
| `vue.format.wrapAttributes` | | `string` | `"auto"` |

<!-- configs -->
7 changes: 5 additions & 2 deletions extensions/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -538,15 +538,16 @@
]
},
"scripts": {
"prebuild": "cd ../.. && pnpm run build",
"prebuild": "pnpm run postinstall && pnpm -C ../.. run build",
"build": "node scripts/build",
"build:minify": "pnpm run build -- --minify",
"watch": "pnpm run build -- --watch",
"pack": "pnpm run build:minify && vsce package",
"pack:next": "pnpm run build && vsce package",
"release": "pnpm run build:minify && vsce publish",
"release:next": "pnpm run build && vsce publish --pre-release",
"size": "pnpm run build:minify -- --metafile && esbuild-visualizer --metadata ./meta.json && open ./stats.html"
"size": "pnpm run build:minify -- --metafile && esbuild-visualizer --metadata ./meta.json && open ./stats.html",
"postinstall": "vscode-ext-gen --scope vue"
},
"devDependencies": {
"@types/semver": "^7.5.3",
Expand All @@ -559,7 +560,9 @@
"esbuild": "~0.21.0",
"esbuild-plugin-copy": "latest",
"esbuild-visualizer": "latest",
"reactive-vscode": "0.2.7-beta.1",
"semver": "^7.5.4",
"vscode-ext-gen": "^0.5.0",
"vscode-tmlanguage-snapshot": "latest"
}
}
Loading