mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
If Salsa is enabled look for the tsserver also in local node_modules
This commit is contained in:
committed by
Johannes Rieken
parent
3e9fe80339
commit
58e894eff3
@@ -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.`);
|
||||
|
||||
Reference in New Issue
Block a user