docs: add VS Code IntelliSense Support section (#4295)

pull/4301/head
Jose Salazar 1 month ago committed by GitHub
parent e638d855cf
commit c593b7f789
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -254,3 +254,38 @@ import ComponentInHeader from '../../components/ComponentInHeader.vue'
padding: 0 20px;
}
</style>
## VS Code IntelliSense Support
<!-- Based on https://github.com/vuejs/language-tools/pull/4321 -->
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.
1. Add `.md` pattern to the `include` and `vueCompilerOptions.vitePressExtensions` options in the tsconfig/jsconfig file:
::: code-group
```json [tsconfig.json]
{
"include": [
"docs/**/*.ts",
"docs/**/*.vue",
"docs/**/*.md",
],
"vueCompilerOptions": {
"vitePressExtensions": [".md"],
},
}
```
:::
2. Add `markdown` to the `vue.server.includeLanguages` option in the VS Code setting:
::: code-group
```json [.vscode/settings.json]
{
"vue.server.includeLanguages": ["vue", "markdown"]
}
```
:::

@ -254,3 +254,36 @@ import ComponentInHeader from '../../components/ComponentInHeader.vue'
padding: 0 20px;
}
</style>
## Soporte de IntelliSense en VS Code
<!-- Based on https://github.com/vuejs/language-tools/pull/4321 -->
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.
1. Agrega el patrón `.md` a las opciones `include` y `vueCompilerOptions.vitePressExtensions` en el archivo tsconfig/jsconfig:
::: code-group
```json [tsconfig.json]
{
"include": [
"docs/**/*.ts",
"docs/**/*.vue",
"docs/**/*.md",
],
"vueCompilerOptions": {
"vitePressExtensions": [".md"],
},
}
```
:::
2. Agrega `markdown` a la opción `vue.server.includeLanguages` en el archivo de configuración de VS Code
::: code-group
```json [.vscode/settings.json]
{
"vue.server.includeLanguages": ["vue", "markdown"]
}
```
:::
Loading…
Cancel
Save