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

Function hover_at

tests/integration/hover.rs:15–26  ·  view source on GitHub ↗

Register file content in the backend (sync) and return the hover result at the given (0-based) line and character.

(
    backend: &Backend,
    uri: &str,
    content: &str,
    line: u32,
    character: u32,
)

Source from the content-addressed store, hash-verified

13/// Register file content in the backend (sync) and return the hover result
14/// at the given (0-based) line and character.
15fn hover_at(
16 backend: &Backend,
17 uri: &str,
18 content: &str,
19 line: u32,
20 character: u32,
21) -> Option<Hover> {
22 // Parse and populate ast_map, use_map, namespace_map, symbol_maps
23 backend.update_ast(uri, content);
24
25 backend.handle_hover(uri, content, Position { line, character })
26}
27
28/// Extract the Markdown text from a Hover response.
29fn hover_text(hover: &Hover) -> &str {

Calls 2

update_astMethod · 0.80
handle_hoverMethod · 0.80