From c593b7f789c285435473e2a8ef15c425552f8203 Mon Sep 17 00:00:00 2001 From: Jose Salazar Date: Thu, 17 Oct 2024 18:21:34 -0300 Subject: [PATCH] docs: add VS Code IntelliSense Support section (#4295) --- docs/en/guide/using-vue.md | 35 +++++++++++++++++++++++++++++++++++ docs/es/guide/using-vue.md | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/docs/en/guide/using-vue.md b/docs/en/guide/using-vue.md index 70d18bce..5a82dc75 100644 --- a/docs/en/guide/using-vue.md +++ b/docs/en/guide/using-vue.md @@ -254,3 +254,38 @@ import ComponentInHeader from '../../components/ComponentInHeader.vue' padding: 0 20px; } + + +## VS Code IntelliSense Support + + + +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"] +} +``` +::: \ No newline at end of file diff --git a/docs/es/guide/using-vue.md b/docs/es/guide/using-vue.md index 97cfbf93..9d18d92d 100644 --- a/docs/es/guide/using-vue.md +++ b/docs/es/guide/using-vue.md @@ -254,3 +254,36 @@ import ComponentInHeader from '../../components/ComponentInHeader.vue' padding: 0 20px; } + +## Soporte de IntelliSense en VS Code + + + +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"] +} +``` +::: \ No newline at end of file