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