MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / goto_definition

Function goto_definition

tests/integration/definition_object_shapes.rs:26–41  ·  view source on GitHub ↗
(
    backend: &phpantom_lsp::Backend,
    uri: &Url,
    line: u32,
    character: u32,
)

Source from the content-addressed store, hash-verified

24}
25
26async fn goto_definition(
27 backend: &phpantom_lsp::Backend,
28 uri: &Url,
29 line: u32,
30 character: u32,
31) -> Option<GotoDefinitionResponse> {
32 let params = GotoDefinitionParams {
33 text_document_position_params: TextDocumentPositionParams {
34 text_document: TextDocumentIdentifier { uri: uri.clone() },
35 position: Position { line, character },
36 },
37 work_done_progress_params: WorkDoneProgressParams::default(),
38 partial_result_params: PartialResultParams::default(),
39 };
40 backend.goto_definition(params).await.unwrap()
41}
42
43fn assert_location(response: GotoDefinitionResponse, expected_uri: &Url, expected_line: u32) {
44 match response {

Calls 3

cloneMethod · 0.80
goto_definitionMethod · 0.80
unwrapMethod · 0.45