File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 55
66from attrs import frozen
77
8+ from lsp_client .capability .build import build_client_capabilities
89from lsp_client .capability .notification import capabilities as notification_capabilities
910from lsp_client .capability .request import capabilities as request_capabilities
1011from lsp_client .capability .server_notification import (
@@ -27,7 +28,7 @@ class CapabilityInspectResult:
2728
2829async def inspect_capabilities (
2930 server : LSPServer , client_cls : type [LSPClient ]
30- ) -> AsyncGenerator [CapabilityInspectResult ]:
31+ ) -> AsyncGenerator [CapabilityInspectResult , None ]:
3132 if not __debug__ :
3233 raise RuntimeError ("inspect_capabilities can only be used in debug mode" )
3334
@@ -36,11 +37,11 @@ async def inspect_capabilities(
3637 req = lsp_type .InitializeRequest (
3738 id = "initialize" ,
3839 params = lsp_type .InitializeParams (
39- capabilities = lsp_type . ClientCapabilities ( )
40+ capabilities = build_client_capabilities ( client_cls )
4041 ),
4142 )
42- resp = await server .request (request_serialize (req ))
43- resp = response_deserialize (resp , lsp_type .InitializeResponse )
43+ raw_resp = await server .request (request_serialize (req ))
44+ resp = response_deserialize (raw_resp , lsp_type .InitializeResponse )
4445 await server .kill ()
4546
4647 server_capabilities = resp .capabilities
You can’t perform that action at this time.
0 commit comments