From 7d90df69f4693913d0ac9ef0aab8e4d746c94aa0 Mon Sep 17 00:00:00 2001 From: Kaloyan Raev Date: Fri, 2 Sep 2016 15:18:22 +0300 Subject: [PATCH] Make $capabilities initialize param optional Eclipse Che does not pass ClientCapabilities in InitializeParams. This works well with other language server, but not with this one. The issue is resolved by making the $capabilities param optional. --- src/LanguageServer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LanguageServer.php b/src/LanguageServer.php index 39eaeed..f10df6e 100644 --- a/src/LanguageServer.php +++ b/src/LanguageServer.php @@ -58,7 +58,7 @@ class LanguageServer extends \AdvancedJsonRpc\Dispatcher * @param ClientCapabilities $capabilities The capabilities provided by the client (editor) * @return InitializeResult */ - public function initialize(string $rootPath, int $processId, ClientCapabilities $capabilities): InitializeResult + public function initialize(string $rootPath, int $processId, ClientCapabilities $capabilities = null): InitializeResult { $serverCapabilities = new ServerCapabilities(); // Ask the client to return always full documents (because we need to rebuild the AST from scratch)