diff --git a/src/Lean/Parser/Term.lean b/src/Lean/Parser/Term.lean index a4b2b2ff8c..1bb91ffb99 100644 --- a/src/Lean/Parser/Term.lean +++ b/src/Lean/Parser/Term.lean @@ -147,9 +147,12 @@ This syntax is used to construct named metavariables. -/ @[builtin_term_parser] def syntheticHole := leading_parser "?" >> (ident <|> hole) /-- -Denotes a term that was omitted by the pretty printer. -This is only meant to be used for pretty printing, however for copy/paste friendliness it elaborates like `_` while logging a warning. -The presence of `⋯` in pretty printer output is controlled by the `pp.deepTerms` and `pp.proofs` options. +The `⋯` term denotes a term that was omitted by the pretty printer. +The presence of `⋯` in pretty printer output is controlled by the `pp.deepTerms` and `pp.proofs` options, +and these options can be further adjusted using `pp.deepTerms.threshold` and `pp.proofs.threshold`. + +It is only meant to be used for pretty printing. +However, in case it is copied and pasted from the Infoview, `⋯` logs a warning and elaborates like `_`. -/ @[builtin_term_parser] def omission := leading_parser "⋯" diff --git a/src/Lean/Server/InfoUtils.lean b/src/Lean/Server/InfoUtils.lean index ec1e29c934..c9113bf1d5 100644 --- a/src/Lean/Server/InfoUtils.lean +++ b/src/Lean/Server/InfoUtils.lean @@ -252,7 +252,7 @@ def Info.docString? (i : Info) : MetaM (Option String) := do if let some decl := (← getOptionDecls).find? oi.optionName then return decl.descr return none - | .ofOmissionInfo _ => return none -- Do not display the docstring of ⋯ for omitted terms + | .ofOmissionInfo _ => pure () -- Fall through to display the docstring of `⋯` for omitted terms | _ => pure () if let some ei := i.toElabInfo? then return ← findDocString? env ei.stx.getKind <||> findDocString? env ei.elaborator