Parser docstring vs syntax hover target audience confusion #5334
Labels
bug
Something isn't working
new-user-papercuts
Issue likely to confuse or otherwise negatively affect new users, even if only a little
P-medium
We may work on this issue if we find the time
Description
A lot of parser and parser combinators have docstrings that aim to explain how to use the the parser, but then they end up being shown to the unsuspecting user when hovering over a piece of syntax that doesn't happen to have a better docstring.
For example in
if you hover over the
:
you getand if you hover over the docstring you get
Depending whether you already have #3918 you need
import Lean
to make these hovers visible, but note thatimport Mathlib
impliesimport Lean
, so that’s not the core issue.It seems that one needs at least a way to indicate “the docstring of this parser or syntax is not meant for hovers”, and going through the code to annotate all docstrings that don’t have a useful user-facing docstring.
A more thorough solution is to somehow be able to write two docstrings, one to document
Lean.Parser.Command.declSig
, and one to show upon hovering:
above.Versions
Around 4.12.0
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
The text was updated successfully, but these errors were encountered: