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

[Proposal] TS Server plugins configuration requests #18604

Closed
mjbvz opened this issue Sep 20, 2017 · 1 comment
Closed

[Proposal] TS Server plugins configuration requests #18604

mjbvz opened this issue Sep 20, 2017 · 1 comment
Assignees
Labels
Suggestion An idea for TypeScript VS Code Tracked There is a VS Code equivalent to this issue

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Sep 20, 2017

Problem

For VS Code, we'd like the ability for VSCode settings to control the behavior of a TS Server plugin. For example, we'd like to pass a setting like "css.lint.emptyRules": "warning" from VSCode to a TypeScript CSS plugin that is contributed by a vscode extensions

There is currently no way for a host client like VSCode to communicate with a TSServer plugin. Plugins may take an optional configuration in the tsconfig.json, but this is static information that the user must enter. If no tsconfig exists, one must be created.

Proposal

Introduce a new TSServer call named configurePlugin or something similar. This call would take a plugin name and a configuration object:

interface ConfigurePluginRequestArgs {
    pluginName: string
    configuration: any
}

On TSServer plugins, introduce a new hook called onPluginConfigurationChanged or something similar. This hook would be invoked with the configuration object:

export function onPluginConfigurationChanged(configuration: any) { 
   plugin.emptyRules = configuration["css.lint.emptyRules"]
}
@mjbvz mjbvz added the VS Code Tracked There is a VS Code equivalent to this issue label Sep 20, 2017
@mhegazy mhegazy added the Suggestion An idea for TypeScript label Oct 9, 2017
@minestarks minestarks self-assigned this Oct 17, 2018
minestarks added a commit to minestarks/TypeScript that referenced this issue Oct 24, 2018
minestarks added a commit to minestarks/TypeScript that referenced this issue Oct 27, 2018
@DanielRosenwasser DanielRosenwasser added this to the TypeScript 3.1.4 milestone Oct 29, 2018
@weswigham
Copy link
Member

Fixed by #28106

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Suggestion An idea for TypeScript VS Code Tracked There is a VS Code equivalent to this issue
Projects
None yet
Development

No branches or pull requests

6 participants