diff --git a/src/server/typescriptServiceClient.ts b/src/server/typescriptServiceClient.ts index f257b31..7d7faf0 100644 --- a/src/server/typescriptServiceClient.ts +++ b/src/server/typescriptServiceClient.ts @@ -815,7 +815,7 @@ export default class TypeScriptServiceClient implements ITypeScriptServiceClient public getProjectRootPath(uri: string): string { let u = Uri.parse(uri) if (u.scheme != 'file') return workspace.cwd - if (u.fsPath.startsWith(workspace.root) && workspace.root != os.homedir()) return workspace.cwd + if (u.fsPath.startsWith(workspace.root) && workspace.root != os.homedir()) return workspace.root let res = findUp.sync(['tsconfig.json', 'jsconfig.json'], { cwd: path.dirname(u.fsPath) }) return res ? path.dirname(res) : workspace.cwd }