Helper: open a file in the backend and return the URI.
(backend: &Backend, uri: &Url, text: &str)
| 4 | |
| 5 | /// Helper: open a file in the backend and return the URI. |
| 6 | async fn open_file(backend: &Backend, uri: &Url, text: &str) { |
| 7 | let open_params = DidOpenTextDocumentParams { |
| 8 | text_document: TextDocumentItem { |
| 9 | uri: uri.clone(), |
| 10 | language_id: "php".to_string(), |
| 11 | version: 1, |
| 12 | text: text.to_string(), |
| 13 | }, |
| 14 | }; |
| 15 | backend.did_open(open_params).await; |
| 16 | } |
| 17 | |
| 18 | /// Helper: send a find-references request and return the locations. |
| 19 | async fn find_references( |
no test coverage detected