feat: hover: use syntax highlighting

This commit is contained in:
Sebastian Ullrich 2021-01-13 12:18:56 +01:00 committed by Leonardo de Moura
parent 310a2ab6a3
commit fa7e679c73

View file

@ -328,7 +328,9 @@ section RequestHandling
let tFmt ← ci.runMetaM i.lctx do
return f!"{← Meta.ppExpr (← Meta.inferType expr)}"
--return f!"{stx.getKind} --> {← Meta.ppExpr expr} <{pos}->{endPos}> : {← Meta.ppExpr (← Meta.inferType expr)}"
let mut hoverStr := s!"`{tFmt}`"
let mut hoverStr := s!"```lean
{tFmt}
```"
if let Expr.const n .. := expr then
if let some doc ← ci.runMetaM i.lctx <| findDocString? n then
hoverStr := s!"{hoverStr}\n***\n{doc}"