Skip to content

Commit 209717c

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

File tree

2 files changed

+13
-21
lines changed

2 files changed

+13
-21
lines changed

extensions/vscode/README.md

+8-16
Original file line numberDiff line numberDiff line change
@@ -257,22 +257,16 @@ Finally you need to make VS Code recognize your new extension and automatically
257257

258258
## Commands
259259

260-
<!-- commands -->
261-
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 |
269-
270-
<!-- commands -->
260+
| Command | Title |
261+
| ------------------------------ | ------------------------------------------------------- |
262+
| `vue.action.restartServer` | Vue: Restart Vue and TS servers |
263+
| `vue.action.doctor` | Vue: Doctor |
264+
| `vue.action.writeVirtualFiles` | Vue (Debug): Write Virtual Files |
265+
| `vue.action.splitEditors` | Vue: Split `<script>`, `<template>`, `<style>` Editors |
266+
| `vue.findAllFileReferences` | Vue: Find File References via Vue Language Server |
271267

272268
## Configs
273269

274-
<!-- configs -->
275-
276270
| Key | Description | Type | Default |
277271
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------- | ----------------------------------- |
278272
| `vue.trace.server` | Traces the communication between VS Code and the language server. | `string` | `"off"` |
@@ -292,7 +286,7 @@ Finally you need to make VS Code recognize your new extension and automatically
292286
| `vue.complete.casing.props` | Preferred attr name case. | `string` | `"autoKebab"` |
293287
| `vue.complete.defineAssignment` | Auto add `const props = ` before `defineProps` when selecting the completion item `props`. (also `emit` and `slots`) | `boolean` | `true` |
294288
| `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` |
289+
| `vue.autoInsert.bracketSpacing` | Auto add space between double curly brackets: <code>{{&vert;}}</code> -> <code>{{ &vert; }}</code> | `boolean` | `true` |
296290
| `vue.inlayHints.destructuredProps` | Show inlay hints for destructured props. | `boolean` | `false` |
297291
| `vue.inlayHints.missingProps` | Show inlay hints for missing required props. | `boolean` | `false` |
298292
| `vue.inlayHints.inlineHandlerLeading` | Show inlay hints for event argument in inline handlers. | `boolean` | `false` |
@@ -302,5 +296,3 @@ Finally you need to make VS Code recognize your new extension and automatically
302296
| `vue.format.style.initialIndent` | | `boolean` | `false` |
303297
| `vue.format.script.initialIndent` | | `boolean` | `false` |
304298
| `vue.format.wrapAttributes` | | `string` | `"auto"` |
305-
306-
<!-- configs -->

extensions/vscode/package.json

+5-5
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",

0 commit comments

Comments
 (0)