emacs client gives null value for initializationOptions
kermorgant opened this issue · comments
I'm a bit unsure whether this belongs to emacs's emacs-lsp package or here.
I've used emacs' lsp-php package and redefined the server command to use phpactor's lsp server.
In the error, I can see this json is given as input
{
"jsonrpc": "2.0",
"method": "initialize",
"params": {
"processId": 4543,
"rootPath": "/home/mikael/workspace/lmt/project/",
"rootUri": "file:///home/mikael/workspace/lmt/project/",
"capabilities": {
"workspace": {
"applyEdit": true,
"executeCommand": {
"dynamicRegistration": true
}
},
"textDocument": {
"synchronization": {
"willSave": true,
"didSave": true,
"willSaveWaitUntil": true
},
"documentSymbol": {
"symbolKind": {
"valueSet": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25
]
},
"hierarchicalDocumentSymbolSupport": true
},
"formatting": {
"dynamicRegistration": true
},
"codeAction": {
"dynamicRegistration": true
},
"completion": {
"completionItem": {
"snippetSupport": true
}
}
}
},
"initializationOptions": null
},
"id": 1
}
Resulting in this error
[2018-10-23 13:47:29] phpactor.ERROR: Argument 2 passed to Phpactor\LanguageServer\Extension\Core\Initialize::__invoke() must be of the type array, null given, ca
an array is expected as second argument (
)I've taken a look at this doc (hopefully the correct place), where we have
/**
* User provided initialization options.
*/
initializationOptions?: any;
Not familiar with typescript but afer a quick googling, seems to me setting that property to null is not allowed. Feel free to reopen if you think I'm wrong.