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

Function open_file

src/references/tests.rs:6–16  ·  view source on GitHub ↗

Helper: open a file in the backend and return the URI.

(backend: &Backend, uri: &Url, text: &str)

Source from the content-addressed store, hash-verified

4
5/// Helper: open a file in the backend and return the URI.
6async 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.
19async fn find_references(

Calls 2

cloneMethod · 0.80
did_openMethod · 0.45

Tested by

no test coverage detected