tsserver should prioritize pluginProbeLocations over peer node_modules #34616
Description
opened on Oct 21, 2019
TypeScript Version:
3.7.0-dev.20191018
Search Terms:
tsserver plugin pluginProbeLocations
Code
TypeScript/src/server/project.ts
Lines 1362 to 1364 in 1d3ecc0
Expected behavior:
If pluginProbeLocations
are provided, tsserver should always prioritize that, and use peer node_modules as fallback.
Actual behavior:
pluginProbeLocations
has no effect if tsserver finds the module in peer node_modules.
From tsserver logs:
In this case, pluginProbeLocations=/Users/aioiyuuko/.vscode/extensions/angular.ng-template-0.900.0-next.2/server/node_modules/@angular/language-service
However, the path is not respected, and instead the plugin was loaded from peer node_module.
Info 9 [9:31:48.985] Enabling plugin @angular/language-service from candidate paths: /Users/aioiyuuko/workspaces/pxn/anduin/node_modules/typescript/lib/tsserverlibrary.js/../../..,/Users/aioiyuuko/.vscode/extensions/angular.ng-template-0.900.0-next.2/server/node_modules/@angular/language-service
Info 10 [9:31:48.985] Loading @angular/language-service from /Users/aioiyuuko/workspaces/pxn/anduin/node_modules/typescript/lib/tsserverlibrary.js/../../.. (resolved to /Users/aioiyuuko/workspaces/pxn/anduin/node_modules/node_modules)
Info 11 [9:31:49.111] Plugin validation succeded
Activity