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

Add missing project method for plugins #462

Merged
merged 4 commits into from
May 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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