Skip to content

Commit c593b7f

Browse files
authored
docs: add VS Code IntelliSense Support section (#4295)
1 parent e638d85 commit c593b7f

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

docs/en/guide/using-vue.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,3 +254,38 @@ import ComponentInHeader from '../../components/ComponentInHeader.vue'
254254
padding: 0 20px;
255255
}
256256
</style>
257+
258+
259+
## VS Code IntelliSense Support
260+
261+
<!-- Based on https://github.com/vuejs/language-tools/pull/4321 -->
262+
263+
Vue provides IntelliSense support out of the box via the [Vue - Official VS Code plugin](https://marketplace.visualstudio.com/items?itemName=Vue.volar). However, to enable it for `.md` files, you need to make some adjustments to the configuration files.
264+
265+
266+
1. Add `.md` pattern to the `include` and `vueCompilerOptions.vitePressExtensions` options in the tsconfig/jsconfig file:
267+
268+
::: code-group
269+
```json [tsconfig.json]
270+
{
271+
"include": [
272+
"docs/**/*.ts",
273+
"docs/**/*.vue",
274+
"docs/**/*.md",
275+
],
276+
"vueCompilerOptions": {
277+
"vitePressExtensions": [".md"],
278+
},
279+
}
280+
```
281+
:::
282+
283+
2. Add `markdown` to the `vue.server.includeLanguages` option in the VS Code setting:
284+
285+
::: code-group
286+
```json [.vscode/settings.json]
287+
{
288+
"vue.server.includeLanguages": ["vue", "markdown"]
289+
}
290+
```
291+
:::

docs/es/guide/using-vue.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,3 +254,36 @@ import ComponentInHeader from '../../components/ComponentInHeader.vue'
254254
padding: 0 20px;
255255
}
256256
</style>
257+
258+
## Soporte de IntelliSense en VS Code
259+
260+
<!-- Based on https://github.com/vuejs/language-tools/pull/4321 -->
261+
262+
Vue ofrece soporte para IntelliSense de forma predeterminada mediante el [Plugin oficial de Vue para VS Code](https://marketplace.visualstudio.com/items?itemName=Vue.volar). Sin embargo, para habilitarlo en archivos `.md`, es necesario realizar algunos ajustes en los archivos de configuración.
263+
264+
1. Agrega el patrón `.md` a las opciones `include` y `vueCompilerOptions.vitePressExtensions` en el archivo tsconfig/jsconfig:
265+
266+
::: code-group
267+
```json [tsconfig.json]
268+
{
269+
"include": [
270+
"docs/**/*.ts",
271+
"docs/**/*.vue",
272+
"docs/**/*.md",
273+
],
274+
"vueCompilerOptions": {
275+
"vitePressExtensions": [".md"],
276+
},
277+
}
278+
```
279+
:::
280+
281+
2. Agrega `markdown` a la opción `vue.server.includeLanguages` en el archivo de configuración de VS Code
282+
283+
::: code-group
284+
```json [.vscode/settings.json]
285+
{
286+
"vue.server.includeLanguages": ["vue", "markdown"]
287+
}
288+
```
289+
:::

0 commit comments

Comments
 (0)