| 24 | } |
| 25 | |
| 26 | async 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 | |
| 43 | fn assert_location(response: GotoDefinitionResponse, expected_uri: &Url, expected_line: u32) { |
| 44 | match response { |