MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / workspace_symbol

Method workspace_symbol

crates/opencode-lsp/src/lib.rs:556–576  ·  view source on GitHub ↗
(
        &self,
        query: &str,
    )

Source from the content-addressed store, hash-verified

554 }
555
556 pub async fn workspace_symbol(
557 &self,
558 query: &str,
559 ) -> Result<Vec<lsp_types::SymbolInformation>, LspError> {
560 let params = lsp_types::WorkspaceSymbolParams {
561 query: query.to_string(),
562 work_done_progress_params: Default::default(),
563 partial_result_params: Default::default(),
564 };
565
566 let result = self
567 .request("workspace/symbol", serde_json::to_value(params)?)
568 .await?;
569
570 if result.is_null() {
571 return Ok(vec![]);
572 }
573
574 let symbols: Vec<lsp_types::SymbolInformation> = serde_json::from_value(result)?;
575 Ok(symbols)
576 }
577
578 pub async fn goto_implementation(
579 &self,

Callers 2

handle_debug_commandFunction · 0.80
execute_with_lspFunction · 0.80

Calls 1

requestMethod · 0.80

Tested by

no test coverage detected