Open a file on the backend.
(backend: &Backend, uri_str: &str, content: &str)
| 32 | |
| 33 | /// Open a file on the backend. |
| 34 | async fn open_file(backend: &Backend, uri_str: &str, content: &str) -> Url { |
| 35 | let uri = Url::parse(uri_str).unwrap(); |
| 36 | let params = DidOpenTextDocumentParams { |
| 37 | text_document: TextDocumentItem { |
| 38 | uri: uri.clone(), |
| 39 | language_id: "php".to_string(), |
| 40 | version: 1, |
| 41 | text: content.to_string(), |
| 42 | }, |
| 43 | }; |
| 44 | backend.did_open(params).await; |
| 45 | uri |
| 46 | } |
| 47 | |
| 48 | /// Fire a completion request at the given position. |
| 49 | async fn fire_completion(backend: &Backend, uri: &Url, line: u32, character: u32) { |
no test coverage detected