Skip to content

configurePlugins command for tsserver#28106

Merged
minestarks merged 3 commits intomicrosoft:release-3.1from
minestarks:configure-plugins
Oct 29, 2018
Merged

configurePlugins command for tsserver#28106
minestarks merged 3 commits intomicrosoft:release-3.1from
minestarks:configure-plugins

Conversation

@minestarks
Copy link
Member

Implements #18604

  • Add a new tsserver command, configurePlugins.
  • Add a new optional method to PluginModule, onConfigurationChanged. Plugin authors can implement this.
  • When configurePlugins is invoked, it will pass on the configuration object to any loaded plugin instances with a matching name.
  • This configuration is meant to override the initial configuration passed in in create/PluginCreateInfo as well as any previous configurations passed in in configurePlugins.
  • The updated configuration will also be remembered by tsserver so that it can be passed in, in the create call, to any projects loaded in the future with the matching plugin. This is needed for consistency -- the caller of configurePlugins would have no way of knowing whether the plugin/project of interest has yet been loaded.

cc @mjbvz

@minestarks minestarks changed the title Configure plugins configurePlugins command for tsserver Oct 24, 2018
Copy link
Contributor

@mjbvz mjbvz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API changes for server and plugins look good! Just let me know how you want us to expose this on the VS Code side

@minestarks
Copy link
Member Author

@mjbvz Thanks! Just opened corresponding PR microsoft/vscode#61756 , let me know if that works.

@sheetalkamat
Copy link
Member

Changes look good but we need test.

@zafarmandor786
Copy link

Thanks

@minestarks
Copy link
Member Author

@sheetalkamat test added!

@sheetalkamat
Copy link
Member

Build failed with api

@minestarks minestarks merged commit 83c38f3 into microsoft:release-3.1 Oct 29, 2018
minestarks added a commit to minestarks/TypeScript that referenced this pull request Oct 29, 2018
minestarks added a commit that referenced this pull request Oct 29, 2018
Merge pull request #28106 from minestarks/configure-plugins
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants