MCPcopy Index your code
hub / github.com/codeaashu/claude-code / formatHoverResult

Function formatHoverResult

src/tools/LSPTool/formatters.ts:253–267  ·  view source on GitHub ↗
(result: Hover | null, _cwd?: string)

Source from the content-addressed store, hash-verified

251 * Formats hover result
252 */
253export function formatHoverResult(result: Hover | null, _cwd?: string): string {
254 if (!result) {
255 return 'No hover information available. This may occur if the cursor is not on a symbol, or if the LSP server has not fully indexed the file.'
256 }
257
258 const content = extractMarkupText(result.contents)
259
260 if (result.range) {
261 const line = result.range.start.line + 1
262 const character = result.range.start.character + 1
263 return `Hover info at ${line}:${character}:\n\n${content}`
264 }
265
266 return content
267}
268
269/**
270 * Maps SymbolKind enum to readable string

Callers 1

formatResultFunction · 0.85

Calls 1

extractMarkupTextFunction · 0.85

Tested by

no test coverage detected