@@ -298,6 +298,7 @@ def capabilities(self):
298298 "workspaceFolders" : {"supported" : True , "changeNotifications" : True }
299299 },
300300 "experimental" : merge (self ._hook ("pylsp_experimental_capabilities" )),
301+ "workspaceSymbolProvider" : True ,
301302 }
302303 log .info ("Server capabilities: %s" , server_capabilities )
303304 return server_capabilities
@@ -433,6 +434,11 @@ def highlight(self, doc_uri, position):
433434 or None
434435 )
435436
437+ def workspace_symbol (self , query ):
438+ response = self ._hook ("pylsp_workspace_symbol" , query = query )
439+ log .debug ("Workspace symbol hook returned: %s" , response )
440+ return flatten (response )
441+
436442 def hover (self , doc_uri , position ):
437443 return self ._hook ("pylsp_hover" , doc_uri , position = position ) or {"contents" : "" }
438444
@@ -767,6 +773,9 @@ def m_text_document__hover(self, textDocument=None, position=None, **_kwargs):
767773 def m_text_document__document_symbol (self , textDocument = None , ** _kwargs ):
768774 return self .document_symbols (textDocument ["uri" ])
769775
776+ def m_workspace__symbol (self , textDocument = None , ** _kwargs ):
777+ return self .workspace_symbol (_kwargs ["query" ])
778+
770779 def m_text_document__formatting (self , textDocument = None , options = None , ** _kwargs ):
771780 return self .format_document (textDocument ["uri" ], options )
772781
0 commit comments