public function symbol(string $query): Promise
    {
        return coroutine(function () use ($query) {
            // Wait until indexing for definitions finished
            if (!$this->sourceIndex->isStaticComplete()) {
                yield waitForEvent($this->sourceIndex, 'static-complete');
            }
            $symbols = [];
            foreach ($this->sourceIndex->getDefinitions() as $fqn => $definition) {
                if ($query === '' || stripos($fqn, $query) !== false) {
                    $symbols[] = $definition->symbolInformation;
                }
            }
            return $symbols;
        });
    }