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

Function open_file

benches/completion.rs:34–46  ·  view source on GitHub ↗

Open a file on the backend.

(backend: &Backend, uri_str: &str, content: &str)

Source from the content-addressed store, hash-verified

32
33/// Open a file on the backend.
34async 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.
49async fn fire_completion(backend: &Backend, uri: &Url, line: u32, character: u32) {

Calls 3

cloneMethod · 0.80
unwrapMethod · 0.45
did_openMethod · 0.45

Tested by

no test coverage detected