Partial work on feedback
parent
a1e56543c3
commit
a81bed93c7
|
@ -56,7 +56,7 @@ class Workspace
|
|||
* the result for the first configuration item in the params).
|
||||
*
|
||||
* @param ConfigurationItem[] $items
|
||||
* @return Promise
|
||||
* @return Promise <mixed[]>
|
||||
*/
|
||||
public function configuration(array $items): Promise
|
||||
{
|
||||
|
|
|
@ -341,9 +341,7 @@ class LanguageServer extends AdvancedJsonRpc\Dispatcher
|
|||
// request configuration if it is supported
|
||||
// support comes with protocol version 3.6.0
|
||||
if ($this->clientCapabilities->workspace->configuration) {
|
||||
$configurationitem = new ConfigurationItem();
|
||||
$configurationitem->section = 'php';
|
||||
$configuration = yield $this->client->workspace->configuration([$configurationitem]);
|
||||
$configuration = yield $this->client->workspace->configuration([new ConfigurationItem('php')]);
|
||||
$options = $this->mapper->map($configuration[0], new Options());
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
declare(strict_types = 1);
|
||||
|
||||
namespace LanguageServer\Protocol;
|
||||
|
||||
|
@ -17,4 +18,10 @@ class ConfigurationItem
|
|||
* @var string|null
|
||||
*/
|
||||
public $section;
|
||||
|
||||
public function __construct(string $section = null, string $scopeUri = null)
|
||||
{
|
||||
$this->section = $section;
|
||||
$this->scopeUri = $scopeUri;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -221,7 +221,7 @@ class Workspace
|
|||
}
|
||||
|
||||
$this->projectIndex->wipe();
|
||||
$this->indexer->index()->otherwise('\\LanguageServer\\crash');
|
||||
yield $this->indexer->index();
|
||||
}
|
||||
} catch (\JsonMapper_Exception $exception) {
|
||||
$this->client->window->showMessage(
|
||||
|
|
Loading…
Reference in New Issue