-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Vue TS Plugin] Modifications to InferredProject's language service were discarded #57630
Comments
I dont see any issues. I am using typescript nightly. Did i miss something. inferredProject.mp4 |
I found that you may also need to install https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode to reproduce the issue. The triggering method for typescript nightly is slightly different. After reopening 2024-03-05.10.50.38.movSystem info:
|
@johnsoncodehk after investigating this it seems the issue with the plugin https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode This is what i did to repro the issue:
After 2, when editor invokes the {
"seq": 41,
"type": "request",
"command": "configurePlugin",
"arguments": {
"pluginName": "typescript-svelte-plugin",
"configuration": {
"enable": false
}
}
} This is where i think plugin reverts the LS to original ts LS and not just making itself pass through. That results in the vue plugin to be not in picture any more for the error requests. |
Thank you very much for your survey! I'll forward this to Svelte language tools maintainers. |
Acknowledgement
Comment
Issue: vuejs/language-tools#3942
Vue TS Plugin modifies project language service at this line to handle virtual code mapping, which works well for ConfiguredProject. But for InferredProject, tsserver seems to always discard the existing language service when switching columns from .vue files to .ts files, and the newly created language service instance will not pass the plugin's create hook, so the plugin cannot modify it again.
However, the plugin's modifications to the language service host are retained, causing the vue file to display unmapped virtual code diagnostic messages.
Steps to reproduce
Since it is just for demonstration purposes, node_modules will not be installed.
tsconfig.json
file in reposrc/components/HelloWorld.vue
HelloWorld.vue
, opensrc/main.ts
, then re-openHelloWorld.vue
The text was updated successfully, but these errors were encountered: