-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Description
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"]
}