From 680f4304533bc3b100c378189c5eaf44293005c5 Mon Sep 17 00:00:00 2001 From: JJK96 Date: Sun, 11 Nov 2018 04:33:12 +0100 Subject: [PATCH] fix: support rootUri (#672) --- src/LanguageServer.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/LanguageServer.php b/src/LanguageServer.php index 05dd48aa..a30992bc 100644 --- a/src/LanguageServer.php +++ b/src/LanguageServer.php @@ -165,8 +165,11 @@ public function __construct(ProtocolReader $reader, ProtocolWriter $writer) * @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 */ - 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) { if ($capabilities->xfilesProvider) {