Skip to content

Commit f2685e7

Browse files
committed
Add runtime check for whether capabilities was passed
1 parent 6fd432d commit f2685e7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pylspclient/lsp_client.py

+2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ def initialize(
5050
:param list workspaceFolders: The workspace folders configured in the client when the server starts. This property is only available if the client supports workspace folders.
5151
It can be `null` if the client supports workspace folders but none are configured.
5252
"""
53+
if capabilities is None:
54+
raise ValueError("capabilities is required")
5355
self.lsp_endpoint.start()
5456
return self.lsp_endpoint.call_method("initialize", processId=processId, rootPath=rootPath, rootUri=rootUri, initializationOptions=initializationOptions, capabilities=capabilities, trace=trace, workspaceFolders=workspaceFolders)
5557

0 commit comments

Comments
 (0)