Update options one by one to update all instance
parent
1e73d08033
commit
1f90b4e393
|
@ -225,18 +225,17 @@ class Workspace
|
|||
}
|
||||
|
||||
$changedOptions = $this->getChangedOptions($settings);
|
||||
$this->options = $settings;
|
||||
|
||||
if (!empty(array_intersect($changedOptions, $this->options->getIndexerOptions()))) {
|
||||
foreach (get_object_vars($settings) as $prop => $val) {
|
||||
$this->options->$prop = $val;
|
||||
}
|
||||
|
||||
if ($this->indexer && !empty(array_intersect($changedOptions, $this->options->getIndexerOptions()))) {
|
||||
// check list of options that changed since last time against the list of valid indexer options
|
||||
|
||||
// start wiping from the main index
|
||||
// wipe main index and start reindexing
|
||||
$this->index->wipe();
|
||||
|
||||
// check for existing indexer and start indexing
|
||||
if ($this->indexer) {
|
||||
$this->indexer->index()->otherwise('\\LanguageServer\\crash');
|
||||
}
|
||||
$this->indexer->index()->otherwise('\\LanguageServer\\crash');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ class DidChangeConfigurationTest extends ServerTestCase
|
|||
if ($msg->body->method === 'window/logMessage' && $promise->state === Promise::PENDING) {
|
||||
if ($msg->body->params->type === MessageType::ERROR) {
|
||||
$promise->reject(new Exception($msg->body->params->message));
|
||||
} elseif (strpos($msg->body->params->message, 'All 0 PHP files parsed') !== false) {
|
||||
} elseif (strpos($msg->body->params->message, 'All 1 PHP files parsed') !== false) {
|
||||
$promise->fulfill();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue