Skip to content
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

Add back reverseConfigFilePriority #3951

Closed
segevfiner opened this issue Mar 3, 2024 · 8 comments
Closed

Add back reverseConfigFilePriority #3951

segevfiner opened this issue Mar 3, 2024 · 8 comments
Labels

Comments

@segevfiner
Copy link
Contributor

With this now removed, I'm getting the wrong tsconfig.json selected in my Vue projects. By having tsconfig.app.json last and enabling this setting, both the TypeScript server and Volar in Vue files picked tsconfig.app.json, now Volar picks up tsconfig.vitest.json instead (Based on the create-vue template). Please restore this setting or make it the default to match TypeScript server behavior.

@johnsoncodehk
Copy link
Member

The Vue language server no longer controls tsconfig selection, because in 2.0 typescript support is implemented through tsserver + @vue/typescript-plugin, which means that now it is all the behavior of tsserver itself.

@segevfiner
Copy link
Contributor Author

Then how can it be that for a vue file I'm getting tsconfig.vitest.json and for a ts file I'm getting tsconfig.app.json? Something must still cause the behavior to be different for this case?

See also #1815

@johnsoncodehk
Copy link
Member

johnsoncodehk commented Mar 3, 2024

Maybe tsserver behaves differently with external files (the file type of Vue files in tsserver projects), I can't give an exact explanation until I dig deeper. Anyway this is now beyond the control of this codebase.

@johnsoncodehk
Copy link
Member

Please track for microsoft/TypeScript#57632

@johnsoncodehk
Copy link
Member

johnsoncodehk commented Mar 5, 2024

@sheetalkamat indicated that this is configurable, I will look into this.

@johnsoncodehk johnsoncodehk reopened this Mar 5, 2024
@johnsoncodehk
Copy link
Member

johnsoncodehk commented Mar 5, 2024

VSCode's TS client does not provide a configuration method for extraFileExtensions, so this is currently not configurable in VSCode for Vue.

https://github.com/microsoft/vscode/blob/8aca9a53311890fa54f0459c6ef2e8994d4d8ae4/extensions/typescript-language-features/src/languageFeatures/fileConfigurationManager.ts#L128-L129

@andrewbrennanfr
Copy link

Hi - very same issue here 🙋
Here is my example https://github.com/andrewbrennanfr/vue-tsconfig
main.ts uses tsconfig.main.json and App.vue uses tsconfig.app.json - completely based on the reverse order.
Downgrading & disabling the built in TS features (as was recommended before) solves the issue.

@johnsoncodehk
Copy link
Member

johnsoncodehk commented Mar 20, 2024

This problem cannot be solved on our side, but 2.0.7 has re-introduced the v1 language server, you can upgrade and make sure not to enable Hybird Mode to get consistent behavior with v1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants