Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit faa787c

Browse files
soywodfelixfbecker
authored andcommitted
fix(plugins): add missing project method for plugins (#462)
1 parent 242e5a0 commit faa787c

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/plugins.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ export interface PluginCreateInfo {
4040
* The portion of tsserver's Project API exposed to plugins
4141
*/
4242
export interface Project {
43-
projectService: {
44-
logger: Logger
45-
}
43+
projectService: { logger: Logger }
44+
getCurrentDirectory(): string
4645
}
4746

4847
/**

src/project-manager.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,11 @@ export class ProjectConfiguration {
385385

386386
const info: PluginCreateInfo = {
387387
config: configEntry,
388-
project: { projectService: { logger: this.logger } }, // TODO: may need more support
388+
project: {
389+
// TODO: may need more support
390+
getCurrentDirectory: () => this.getHost().getCurrentDirectory(),
391+
projectService: { logger: this.logger },
392+
},
389393
languageService: this.getService(),
390394
languageServiceHost: this.getHost(),
391395
serverHost: {}, // TODO: may need an adapter

0 commit comments

Comments
 (0)