Skip to content

Can call LanguageClient_workspace_symbol with argument? #23

@saibing

Description

@saibing

There is no any argument in function LanguageClient_workspace_symbol.

    @neovim.function('LanguageClient_workspace_symbol')                                                                                                                               
      @args()                                                                                                                                                                           
      def workspace_symbol(                                                                                                                                                             
              self, languageId: str = None, query: str = None,                                                                                                                          
              sync: bool = None, cbs: List = None) -> None:                                                                                                                             
          logger.info("Begin workspace/symbol")                                                                                                                                         
                                                                                                                                                                                        
          if query is None:                                                                                                                                                             
              query = ""                                                                                                                                                                
          if not sync and not cbs:                                                                                                                                                      
              cbs = [partial(self.handleWorkspaceSymbolResponse,                                                                                                                        
                             selectionUI=self.getSelectionUI()),                                                                                                                        
                     self.handleError]                                                                                                                                                  
                                                                                                                                                                                        
          return self.rpc[languageId].call('workspace/symbol', {                                                                                                                        
              "query": query                                                                                                                                                            
x             }, cbs)               

In LSP document:

Workspace Symbols Request

The workspace symbol request is sent from the client to the server to list project-wide symbols matching the query string.

Request:

method: 'workspace/symbol'
params: WorkspaceSymbolParams defined as follows:

/**
 * The parameters of a Workspace Symbol Request.
 */
interface WorkspaceSymbolParams {
    /**
     * A non-empty query string
     */
    query: string;
}

Passing a query parameter can reduce the fzf selection list

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions