MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / format_hover_result

Function format_hover_result

crates/opencode-tool/src/lsp_tool.rs:365–375  ·  view source on GitHub ↗
(hover: lsp_types::Hover)

Source from the content-addressed store, hash-verified

363
364#[cfg(feature = "lsp")]
365fn format_hover_result(hover: lsp_types::Hover) -> String {
366 match hover.contents {
367 lsp_types::HoverContents::Scalar(markup) => format_markup(markup),
368 lsp_types::HoverContents::Array(markups) => markups
369 .into_iter()
370 .map(format_markup)
371 .collect::<Vec<_>>()
372 .join("\n"),
373 lsp_types::HoverContents::Markup(content) => content.value,
374 }
375}
376
377#[cfg(feature = "lsp")]
378fn format_markup(markup: lsp_types::MarkedString) -> String {

Callers 1

execute_with_lspFunction · 0.85

Calls 1

format_markupFunction · 0.85

Tested by

no test coverage detected