Skip to content

Enable discovery of locally installed Typescript Language Service plugins #45856

@killerDJO

Description

@killerDJO

Issue Type: Feature Request

Currently, the typescript language service (tsserver) used by VS Code doesn't discover language service plugins installed locally. Instead, it tries to search them relative to a typescript sdk location.

Steps to reproduce:

  1. Specify a globally installed typescript version to use for a workspace (in general, typescript must be installed outside of the local project).
  2. Install a typescript language service plugin to local node modules (e. g. tslint-language-service).
  3. Add language service plugin in tsconfig, e. g.
    "plugins": [ { "name": "tslint-language-service" } ]

Expected: Plugin is discovered and loaded.
Actual: Plugin is not discovered. TsServer tries to load it only relative to the typescript installation path.

Proposed change:
There is an option available in tsserver (--allowLocalPluginLoads) which enables discovery of locally installed plugins (available starting from TypeScript 2.3.3). Visual Studio already uses this option by default for TypeScript editing. The ideal solution would be to provide an option in VS Code to enable such behaviour (e. g. "typescript.tsserver.allowLocalPluginLoads": true) or enable it by default.

VS Code version: Code 1.21.0 (9a199d7, 2018-03-07T11:04:09.886Z)
OS version: Windows_NT ia32 10.0.16299

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions