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

TS Server plugin extension contributions #41113

Closed
mjbvz opened this issue Jan 3, 2018 · 0 comments
Closed

TS Server plugin extension contributions #41113

mjbvz opened this issue Jan 3, 2018 · 0 comments
Assignees
Labels
api feature-request Request for new features or functionality on-testplan
Milestone

Comments

@mjbvz
Copy link
Collaborator

mjbvz commented Jan 3, 2018

Background
TS Server plugins allow developers to extend TS Server's editor features. This plugin for example adds syntax checking and intellisense for styled-components. Using these plugins in VS Code currently requires a number of manual setup steps, including npm installing the plugin and adding it to your jsconfig

We would like to eliminate these steps by allowing VS Code extensions to contribute TS Server plugins, just like they can contribute new grammars or commands. A contributed plugin would always be loaded when you use VS Code's version of TypeScript

Proposal
In an extension's package.json, add a new typescriptServerPlugins contribution point:

 "contributes": {
    "typescriptServerPlugins": [
      {
        "name": "typescript-styled-plugin"
      }
    ]
  }

typescriptServerPlugins is array of plugins to load. The name field specifies the name of the plugin to load from within the extension (for the above example, the extension would have a dependency on typescript-styled-plugin which would be installed in its node_modules)

The typescript-styled-plugin plugin would now be loaded automatically for JS and TS (both for code with and without a jsconfig or tsconfig). It would not be loaded if you are using a custom typescript version due to concerns about versioning (this area needs more thought).

@mjbvz mjbvz added api feature-request Request for new features or functionality labels Jan 3, 2018
@mjbvz mjbvz added this to the December 2017/January 2018 milestone Jan 3, 2018
@mjbvz mjbvz self-assigned this Jan 3, 2018
@mjbvz mjbvz closed this as completed Jan 12, 2018
@mjbvz mjbvz added the verification-needed Verification of issue is requested label Jan 12, 2018
@roblourens roblourens added on-testplan and removed verification-needed Verification of issue is requested labels Feb 1, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api feature-request Request for new features or functionality on-testplan
Projects
None yet
Development

No branches or pull requests

2 participants