language-tools
language-tools copied to clipboard
Pug Typescript validation messed up after update from Volar
This wasn't happening before the update, if I switch to tags it works but does not work for Pug:
This started as soon as TypeScript Vue Plugin (Volar) was deprecated. My guess is not all features were ported into the main extension.
Incase anyone ends up in this situation, you can downgrade back to the working extensions by downloading and installing the previously working Volar VSIX extensions here: https://marketplace.visualstudio.com/_apis/public/gallery/publishers/Vue/vsextensions/volar/0.17.6/vspackage https://marketplace.visualstudio.com/_apis/public/gallery/publishers/Vue/vsextensions/vscode-typescript-vue-plugin/1.8.27/vspackage
Make sure you turn off auto-update.
Have you installed the @vue/language-plugin-pug
plugin?
@so1ve Yes, here are my Vue packages:
"@volar/vue-language-plugin-pug": "^1.6.5",
"@vue/language-plugin-pug": "^2.0.6",
"@vueuse/core": "^10.2.1",
"vue": "^3.3.4",
"vue-router": "^4.0.0",
"vue-tsc": "^1.8.4",
"eslint-plugin-vue": "^9.23.0",
Could you please share your tsconfig.json
?
{
"extends": "@quasar/app-vite/tsconfig-preset",
"vueCompilerOptions": {
"target": 3,
"skipTemplateCodegen": false, // For Volar Extension
"plugins": [
"@volar/vue-language-plugin-pug"
],
"baseUrl": ".",
"paths": {
"@/*": ["src/*"],
"*": ["node_modules/*", "path/to/your/modules/*"]
},
},
"compilerOptions": {
"baseUrl": ".",
"module": "es2015",
"moduleResolution": "node",
"target": "es5",
"sourceMap": true,
"allowJs": true
},
"include": [
"./src/**/*"
],
}
Your vueCompilerOptions
is outdated. Replace
"skipTemplateCodegen": false, // For Volar Extension
"plugins": [
"@volar/vue-language-plugin-pug"
],
with
"plugins": [
"@vue/language-plugin-pug"
],
···
And the latest version of Volar is 2.0.6 (v1 is 1.8.27). Please make sure the plugin version matches your Volar version.
Thanks - oddly enough there was no pop up message warning me about the upgrades or deprecation or that I needed to update my tsconfig to keep things working - but I'll try that out when I get some time
good day! I can't figure out why it doesn't work, everything is installed in accordance with the recommendations
And the latest version of Volar is 2.0.6 (v1 is 1.8.27). Please make sure the plugin version matches your Volar version.