leanprover / leanprover/lean4

RFC: Full name when clicking in infoview

Open
#9,992 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Proposal

I propose that we display the full name of the constant when clicking in the infoview.

For example, consider the following code:

namespace Foo

axiom test : Nat

theorem bar : test = 0 := by
  sorry

end Foo
Image

If you put your cursor before the sorry, and click on the test in the infoview, there is no way to see that it actually refers to Foo.test, which might cause it to be difficult to look up the correct lemmas. I propose that the output generated when clicking on test should be Foo.test.

Community Feedback

Zulip.

Someone asked if the full name should appear when clicked once or twice, and I said that I do not mind it either way. They also pointed out that this should be as easy as setting set_option pp.fullNames true when clicking on the infoview.

Impact

Add 👍 to issues you consider important. If others benefit from the changes in this proposal being added, 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

Start by tracing how the infoview handles clicks on identifiers and review the existing pp.fullNames option mentioned in the proposal. Done means that clicking test in the shown example presents the fully qualified name Foo.test, with the interaction behavior chosen consistently.

Written by the indexing model from the issue text.

Assessment

Domain
developer-experience, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.