microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.18k stars 28.84k forks source link

Expose API/configuration to add supported language IDs for `typescript-language-features` #200511

Open johnsoncodehk opened 10 months ago

johnsoncodehk commented 10 months ago

We are migrating the Vue Language Features extension from our own TS LSP server to the TS plugin. I found that some features of typescript-language-features cannot be configured. I can only modify typescript-language-features in a very hacky way. Code to add supported language mode:

https://github.com/vuejs/language-tools/pull/3788/files#diff-3c2b2dc57146f5d52dc996ede798d28b5e6163dcd75762900a25803398a099edR187-R207

I think it is feasible to expose a function like addSupportedLanguageMode() through getAPI(), or configure through contributions.

In addition to Vue, Astro, MDX, and Svelte may also be migrated to TS plugin soon, which will be helpful for related extensions.

RedCMD commented 10 months ago

related https://github.com/microsoft/vscode/pull/198583 https://github.com/microsoft/vscode/pull/146731