Skip to content

Commit bf71d7c

Browse files
KazariEXjohnsoncodehk
authored andcommitted
feat(vscode): add examples to inlay hints configuration (#5068)
1 parent f35dfa0 commit bf71d7c

File tree

3 files changed

+14
-34
lines changed

3 files changed

+14
-34
lines changed

Diff for: extensions/vscode/README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -259,13 +259,13 @@ Finally you need to make VS Code recognize your new extension and automatically
259259

260260
<!-- commands -->
261261

262-
| Command | Title |
263-
| ------------------------------ | ------------------------------------------------------ |
264-
| `vue.action.restartServer` | Vue: Restart Vue and TS servers |
265-
| `vue.action.doctor` | Vue: Doctor |
266-
| `vue.action.writeVirtualFiles` | Vue (Debug): Write Virtual Files |
267-
| `vue.action.splitEditors` | Vue: Split &lt;script&gt;, <template>, <style> Editors |
268-
| `vue.findAllFileReferences` | Vue: Find File References via Vue Language Server |
262+
| Command | Title |
263+
| ------------------------------ | ------------------------------------------------------- |
264+
| `vue.action.restartServer` | Vue: Restart Vue and TS servers |
265+
| `vue.action.doctor` | Vue: Doctor |
266+
| `vue.action.writeVirtualFiles` | Vue (Debug): Write Virtual Files |
267+
| `vue.action.splitEditors` | Vue: Split `<script>`, `<template>`, `<style>` Editors |
268+
| `vue.findAllFileReferences` | Vue: Find File References via Vue Language Server |
269269

270270
<!-- commands -->
271271

@@ -292,7 +292,7 @@ Finally you need to make VS Code recognize your new extension and automatically
292292
| `vue.complete.casing.props` | Preferred attr name case. | `string` | `"autoKebab"` |
293293
| `vue.complete.defineAssignment` | Auto add `const props = ` before `defineProps` when selecting the completion item `props`. (also `emit` and `slots`) | `boolean` | `true` |
294294
| `vue.autoInsert.dotValue` | Auto-complete Ref value with `.value`. | `boolean` | `false` |
295-
| `vue.autoInsert.bracketSpacing` | Auto add space between double curly brackets: {{&vert;}} -&gt; {{ | }} | `boolean` | `true` |
295+
| `vue.autoInsert.bracketSpacing` | Auto add space between double curly brackets: <code>{{&vert;}}</code> -> <code>{{ &vert; }}</code> | `boolean` | `true` |
296296
| `vue.inlayHints.destructuredProps` | Show inlay hints for destructured props. | `boolean` | `false` |
297297
| `vue.inlayHints.missingProps` | Show inlay hints for missing required props. | `boolean` | `false` |
298298
| `vue.inlayHints.inlineHandlerLeading` | Show inlay hints for event argument in inline handlers. | `boolean` | `false` |

Diff for: extensions/vscode/package.json

+6-8
Original file line numberDiff line numberDiff line change
@@ -402,27 +402,27 @@
402402
"vue.inlayHints.destructuredProps": {
403403
"type": "boolean",
404404
"default": false,
405-
"description": "Show inlay hints for destructured props."
405+
"markdownDescription": "Show inlay hints for destructured props:\n\n```ts\nwatch(() => /* props. */foo, () => { ... });\n```"
406406
},
407407
"vue.inlayHints.missingProps": {
408408
"type": "boolean",
409409
"default": false,
410-
"description": "Show inlay hints for missing required props."
410+
"markdownDescription": "Show inlay hints for missing required props:\n\n```html\n<Comp />\n<!-- ^ foo! -->\n```"
411411
},
412412
"vue.inlayHints.inlineHandlerLeading": {
413413
"type": "boolean",
414414
"default": false,
415-
"description": "Show inlay hints for event argument in inline handlers."
415+
"markdownDescription": "Show inlay hints for event argument in inline handlers:\n\n```html\n<Comp @foo=\"/* $event => */console.log($event)\" />\n```"
416416
},
417417
"vue.inlayHints.optionsWrapper": {
418418
"type": "boolean",
419419
"default": false,
420-
"description": "Show inlay hints for component options wrapper for type support."
420+
"markdownDescription": "Show inlay hints for component options wrapper for type support:\n\n```vue\n<script lang=\"ts\">\nexport default /* (await import('vue')).defineComponent( */{}/* ) */;\n</script>\n```"
421421
},
422422
"vue.inlayHints.vBindShorthand": {
423423
"type": "boolean",
424424
"default": false,
425-
"description": "Show inlay hints for v-bind shorthand."
425+
"markdownDescription": "Show inlay hints for v-bind shorthand:\n\n```html\n<Comp :foo />\n <!-- ^ =\"foo\" -->\n```"
426426
},
427427
"vue.format.template.initialIndent": {
428428
"type": "boolean",
@@ -559,8 +559,7 @@
559559
"pack:next": "pnpm run build && vsce package",
560560
"release": "pnpm run build:minify && vsce publish",
561561
"release:next": "pnpm run build && vsce publish --pre-release",
562-
"size": "pnpm run build:minify -- --metafile && esbuild-visualizer --metadata ./meta.json && open ./stats.html",
563-
"postinstall": "vscode-ext-gen --scope vue"
562+
"size": "pnpm run build:minify -- --metafile && esbuild-visualizer --metadata ./meta.json && open ./stats.html"
564563
},
565564
"devDependencies": {
566565
"@types/semver": "^7.5.3",
@@ -574,7 +573,6 @@
574573
"esbuild-visualizer": "latest",
575574
"reactive-vscode": "^0.2.9",
576575
"semver": "^7.5.4",
577-
"vscode-ext-gen": "^0.5.0",
578576
"vscode-tmlanguage-snapshot": "latest"
579577
}
580578
}

Diff for: pnpm-lock.yaml

-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)