Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hovering over the _ in ?_ shows irrelevant docstring #5021

Closed
3 tasks done
TwoFX opened this issue Aug 13, 2024 · 0 comments · Fixed by #5118
Closed
3 tasks done

Hovering over the _ in ?_ shows irrelevant docstring #5021

TwoFX opened this issue Aug 13, 2024 · 0 comments · Fixed by #5118
Labels
bug Something isn't working P-medium We may work on this issue if we find the time

Comments

@TwoFX
Copy link
Member

TwoFX commented Aug 13, 2024

Prerequisites

Please put an X between the brackets as you perform the following steps:

Description

When hovering over the ? in ?_ you get the correct docstring for synthetic holes, but when hovering over the _ you get the docstring for normal holes which is not applicable here.

Steps to Reproduce

example : False := by
  refine ?_
  sorry
  1. Paste the above code into the Lean web editor
  2. Move the cursor on top of the underscore

Expected behavior: Docstring for synthetic holes is shown

Actual behavior: Docstring for normal holes is shown

Versions

4.12.0-nightly-2024-08-13 on live.lean-lang.org

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

@TwoFX TwoFX added the bug Something isn't working label Aug 13, 2024
@leanprover-bot leanprover-bot added the P-medium We may work on this issue if we find the time label Aug 16, 2024
nomeata added a commit that referenced this issue Aug 21, 2024
in principle we'd like to use the existing parser
```
   "?" >> (ident <|> hole)
```
but somehow annotate it so that hovering the `hole` will not show the
hole's hover. But for now it was easier to just change the parser to
```
   "?" >> (ident <|> "_")
```
and be done with it.

Fixes #5021
github-merge-queue bot pushed a commit that referenced this issue Aug 21, 2024
in principle we'd like to use the existing parser
```
   "?" >> (ident <|> hole)
```
but somehow annotate it so that hovering the `hole` will not show the
hole's hover. But for now it was easier to just change the parser to
```
   "?" >> (ident <|> "_")
```
and be done with it.

Fixes #5021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P-medium We may work on this issue if we find the time
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants