Skip to content

Commit

Permalink
docs: add VS Code IntelliSense Support section (#4295)
Browse files Browse the repository at this point in the history
  • Loading branch information
salazarr-js authored Oct 17, 2024
1 parent e638d85 commit c593b7f
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
35 changes: 35 additions & 0 deletions docs/en/guide/using-vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
```
:::
33 changes: 33 additions & 0 deletions docs/es/guide/using-vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
```
:::

0 comments on commit c593b7f

Please sign in to comment.