Merge eb963b0905
into 8e36e59e9a
commit
5c94278e79
|
@ -74,11 +74,6 @@ class LanguageServer extends AdvancedJsonRpc\Dispatcher
|
|||
});
|
||||
$this->protocolWriter = $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
|
||||
{
|
||||
// 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
|
||||
if ($rootPath) {
|
||||
$this->indexProject($rootPath);
|
||||
|
@ -124,7 +124,7 @@ class LanguageServer extends AdvancedJsonRpc\Dispatcher
|
|||
*/
|
||||
public function shutdown()
|
||||
{
|
||||
|
||||
unset($this->project);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue