Skip to content

Commit 680f430

Browse files
JJK96felixfbecker
authored andcommitted
fix: support rootUri (felixfbecker#672)
1 parent c7d25c7 commit 680f430

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/LanguageServer.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,11 @@ public function __construct(ProtocolReader $reader, ProtocolWriter $writer)
165165
* @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.
166166
* @return Promise <InitializeResult>
167167
*/
168-
public function initialize(ClientCapabilities $capabilities, string $rootPath = null, int $processId = null): Promise
168+
public function initialize(ClientCapabilities $capabilities, string $rootPath = null, int $processId = null, string $rootUri = null): Promise
169169
{
170+
if ($rootPath === null) {
171+
$rootPath = uriToPath($rootUri);
172+
}
170173
return coroutine(function () use ($capabilities, $rootPath, $processId) {
171174

172175
if ($capabilities->xfilesProvider) {

0 commit comments

Comments
 (0)