resolve tsserver.js
via an absolute path (#57)
this commit changes the `tsserver.js` resolution logic to use an absolute path rather than a relative one. previously, if a user wanted to use a `tsserver.js` that was local to a project but didn't live in `node_modules` (which would be automatically resolved by default), the `tsserver.tsdk` needed to be hardcoded to an absolute path. this required the user to modify `coc-settings.json` each time they wished to switch projects. by resolving to an absolute path, a user can now set the value to a relative path which will resolve correctly per project. this change facilitates simplified usage of Yarn v2's PnP feature, which can generate a project-specific `tsserver.js` to enable correct IDE integration.
This commit is contained in:
parent
74bb59b24e
commit
3a4f993918
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ export class TypeScriptVersion {
|
||||||
}
|
}
|
||||||
|
|
||||||
public get tsServerPath(): string {
|
public get tsServerPath(): string {
|
||||||
return path.join(this.path, 'tsserver.js')
|
return path.resolve(this.path, 'tsserver.js')
|
||||||
}
|
}
|
||||||
|
|
||||||
public get pathLabel(): string {
|
public get pathLabel(): string {
|
||||||
|
|
Loading…
Reference in a new issue