leanprover / leanprover/lean4

return without argument doesn't highlight corresponding do

Open
#3,038 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug do-notation P-low server
Dominant language
Lean
Stars
9.2k
Forks
990
Avg merge
1d 17h
Merged PRs (30d)
175

Description

Prerequisites
  • Put an X between the brackets on this line if you have done all of the following:
    • Check that your issue is not already filed.
    • Reduce the issue to a minimal, self-contained, reproducible test case. Avoid dependencies to mathlib4 or std4.
Description

When writing the following and clicking in the middle of the word return, the keyword do is highlighted.

example : Id Unit := do return ()

When writing the do without argument, I don't see do highlighted no matter how I click/hover over return.

example : Id Unit := do return
Versions

Lean 4.4.0-rc1, Windows 11

Impact

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the two minimal Lean examples in Lean 4.4.0-rc1 and compare how clicking or hovering over return highlights do. Start by locating the syntax-highlighting behavior for these keywords; done means the argumentless do return form highlights its corresponding do consistently.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.