leanprover / leanprover/lean4

Bad rendering of "apply suggestions" on hover

Open
#12,292 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description

When getting a suggestion to update code, some unicode characters for formatting produce rendering artifacts on hover.

Discussed / found together with @david-christiansen

Steps to Reproduce
  1. Edit file
import Lean

set_option doc.verso true

/-- `a` is a simple definition -/
def a := 3

-- simp
theorem addC (n m : Nat) : n + m = m + n := by
  simp [Nat.add_comm, Nat.add_assoc]
  1. Hover over the warnings.

  2. The rendering is incorrect as shown below.

Image Image

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

Start by reproducing the issue with the provided Lean snippet, then hover over the warnings that offer code suggestions and compare the rendered formatting with the screenshots. Trace the hover and “apply suggestions” rendering path, and consider the issue done when the relevant Unicode formatting characters render without artifacts.

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
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.