-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Track TS Server Extension API #22101
Comments
Our current proposal for the implementation: The agreement with the TS team was that plugins will come through VSCode extensions. For example, if a user wants enhanced angular language support, they would install an In the VSCode TypeScript extension, during activation we pick up a list of contributed TSServer plugins from other installed extension. This list would come from entries in each extension's package.json: {
"contributes": {
"typescript-plugins": [
"tss-angular-plugin",
"tss-html-plugin"
]
}
} When starting the TypeScript server, the VSCode TypeScript extension will provide a list of plugin that we know about, along with the directories to search for installed plugins:
When TypeScript is being run out of the user's workspace, we would not pass in any plugin dirs. This means that all extension plugins would have to come from the workspace. When resolving the plugins themselves, typescript would first search adjacent to its own install and then in each of the |
Closing this since the investigation part is complete. We'll look into prototyping plugin support next month |
@mjbvz here is a more complete write-up. ContextThe TS server is extensible via plugins. Plugins fall in two categories:
The first categories of plugins is straight forward. VS Code already knows that the TS server is taking care of TS and JS files. For the second category, configuration is required as VS Code needs to know about the new file types that the TS server can handle. All plugins need to be installed at locations that the TS server knows. Which of those plugins a TS server uses for a given project is specified in the project's ConstraintsIn order to support TS server plugins in VS Code we need a solution that:
ProposalTS server plugins will come through VS Code extensions. For example, if a user wants enhanced VS Code extensions that provide TS server plugins needs to declare a dependency on the VS Code TypeScript extension. The dependency on the VS Code TypeScript extension will ensure that the VS Code TypeScript extension is activates before any extension that provides TS server plugins. This also ensures that the user could also influence the decision about which TS installation is being used in case there are multiple ones or there is a On activation, the VS Code TypeScript extension will pick up a list of contributed TS server plugins from other installed extension. This list comes from entries in {
"contributes": {
"typescript-plugins": [
"tss-angular-plugin",
"tss-html-plugin"
]
}
*** TBD file type spec ***
} When starting the TS server, the VS Code TypeScript extension will provide a list of known TS server plugins, along with their installation directories:
When resolving the plugins listed in When the TS server is being run out of the user's workspace or is specified through a |
extracted feedback on the current support into a separate issue #25769. |
No description provided.
The text was updated successfully, but these errors were encountered: