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

Function extract_hover_markdown

src/completion/resolve.rs:79–84  ·  view source on GitHub ↗

Extract the markdown string from a `Hover` value. The hover methods always produce `HoverContents::Markup`, so this just unwraps the inner `MarkupContent::value`.

(hover: Hover)

Source from the content-addressed store, hash-verified

77/// The hover methods always produce `HoverContents::Markup`, so this
78/// just unwraps the inner `MarkupContent::value`.
79fn extract_hover_markdown(hover: Hover) -> Option<String> {
80 match hover.contents {
81 HoverContents::Markup(mc) => Some(mc.value),
82 _ => None,
83 }
84}
85
86/// Set the `documentation` field on a `CompletionItem` from a markdown
87/// string, if non-empty.

Callers 3

resolve_memberMethod · 0.85
resolve_functionMethod · 0.85
resolve_classMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected