1
0
Fork 0
pull/89/merge
Felix Becker 2016-10-20 01:41:16 +00:00 committed by GitHub
commit 5c94278e79
1 changed files with 6 additions and 6 deletions

View File

@ -74,11 +74,6 @@ class LanguageServer extends AdvancedJsonRpc\Dispatcher
}); });
$this->protocolWriter = $writer; $this->protocolWriter = $writer;
$this->client = new LanguageClient($writer); $this->client = new LanguageClient($writer);
$this->project = new Project($this->client);
$this->textDocument = new Server\TextDocument($this->project, $this->client);
$this->workspace = new Server\Workspace($this->project, $this->client);
} }
/** /**
@ -91,6 +86,11 @@ class LanguageServer extends AdvancedJsonRpc\Dispatcher
*/ */
public function initialize(int $processId, ClientCapabilities $capabilities, string $rootPath = null): InitializeResult public function initialize(int $processId, ClientCapabilities $capabilities, string $rootPath = null): InitializeResult
{ {
// Initialize project
$this->project = new Project($this->client);
$this->textDocument = new Server\TextDocument($this->project, $this->client);
$this->workspace = new Server\Workspace($this->project, $this->client);
// start building project index // start building project index
if ($rootPath) { if ($rootPath) {
$this->indexProject($rootPath); $this->indexProject($rootPath);
@ -124,7 +124,7 @@ class LanguageServer extends AdvancedJsonRpc\Dispatcher
*/ */
public function shutdown() public function shutdown()
{ {
unset($this->project);
} }
/** /**