diff --git a/src/plugins.ts b/src/plugins.ts index bed3e977e..8436e9948 100644 --- a/src/plugins.ts +++ b/src/plugins.ts @@ -40,9 +40,8 @@ export interface PluginCreateInfo { * The portion of tsserver's Project API exposed to plugins */ export interface Project { - projectService: { - logger: Logger - } + projectService: { logger: Logger } + getCurrentDirectory(): string } /** diff --git a/src/project-manager.ts b/src/project-manager.ts index c47e06446..4d6a104b0 100644 --- a/src/project-manager.ts +++ b/src/project-manager.ts @@ -385,7 +385,11 @@ export class ProjectConfiguration { const info: PluginCreateInfo = { config: configEntry, - project: { projectService: { logger: this.logger } }, // TODO: may need more support + project: { + // TODO: may need more support + getCurrentDirectory: () => this.getHost().getCurrentDirectory(), + projectService: { logger: this.logger }, + }, languageService: this.getService(), languageServiceHost: this.getHost(), serverHost: {}, // TODO: may need an adapter