提交 6c540906 编写于 作者: D Dirk Baeumer

If Salsa is enabled look for the tsserver also in local node_modules

上级 a39afd60
......@@ -117,6 +117,11 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient
} else if (workspace.rootPath) {
modulePath = path.join(workspace.rootPath, this.tsdk, 'tsserver.js');
}
} else if (!!process.env['CODE_TSJS'] || !!process.env['VSCODE_TSJS']) {
let candidate = path.join(workspace.rootPath, 'node_modules', 'typescript', 'lib', 'tsserver.js');
if (fs.existsSync(candidate)) {
modulePath = candidate;
}
}
if (!fs.existsSync(modulePath)) {
window.showErrorMessage(`The path ${path.dirname(modulePath)} doesn't point to a valid tsserver install. TypeScript language features will be disabled.`);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册