1
0
Fork 0

Add functionality for rootUri

pull/672/head
Jan-Jaap Korpershoek 2018-09-09 18:09:03 +02:00
parent 18c6ccd137
commit 4063337b76
2 changed files with 5 additions and 4 deletions

4
package-lock.json generated
View File

@ -1,8 +1,6 @@
{ {
"name": "php-language-server",
"version": "0.0.0-development",
"lockfileVersion": 1,
"requires": true, "requires": true,
"lockfileVersion": 1,
"dependencies": { "dependencies": {
"@gimenete/type-writer": { "@gimenete/type-writer": {
"version": "0.1.3", "version": "0.1.3",

View File

@ -165,8 +165,11 @@ class LanguageServer extends AdvancedJsonRpc\Dispatcher
* @param int|null $processId The process Id of the parent process that started the server. Is null if the process has not been started by another process. If the parent process is not alive then the server should exit (see exit notification) its process. * @param int|null $processId The process Id of the parent process that started the server. Is null if the process has not been started by another process. If the parent process is not alive then the server should exit (see exit notification) its process.
* @return Promise <InitializeResult> * @return Promise <InitializeResult>
*/ */
public function initialize(ClientCapabilities $capabilities, string $rootPath = null, int $processId = null): Promise public function initialize(ClientCapabilities $capabilities, string $rootPath = null, int $processId = null, string $rootUri = null): Promise
{ {
if ($rootPath === null) {
$rootPath = uriToPath($rootUri);
}
return coroutine(function () use ($capabilities, $rootPath, $processId) { return coroutine(function () use ($capabilities, $rootPath, $processId) {
if ($capabilities->xfilesProvider) { if ($capabilities->xfilesProvider) {