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

Commit

Permalink
fix(plugins): add missing project method for plugins (#462)
Browse files Browse the repository at this point in the history
  • Loading branch information
soywod authored and felixfbecker committed May 30, 2018
1 parent 242e5a0 commit faa787c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

/**
Expand Down
6 changes: 5 additions & 1 deletion src/project-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit faa787c

Please sign in to comment.