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

Hover on proof name #875

Open
Alizter opened this issue Nov 19, 2024 · 1 comment
Open

Hover on proof name #875

Alizter opened this issue Nov 19, 2024 · 1 comment
Labels
kind: bug Something isn't working

Comments

@Alizter
Copy link
Collaborator

Alizter commented Nov 19, 2024

Observe the following on hover:

From Coq Require Import Prelude.
Axiom A : Type.
Axiom a : A.
Definition foo {n : nat} : A := a.
Definition foo' {n : nat} : A. Proof. apply a. Qed.
Definition foo'' {n : nat} : A. Proof. apply a. Defined.
  • Hovering on foo gives the type of foo since it has meaning where we interpret it.
  • Hovering on foo' and foo'' is empty.

I think we should be using the env at Defined or Qed for these kinds of hovers, rather than at that point in the document, so that users can see the type of a definition/lemma.

Hover has more information than is available in the written type in these cases, such as universe variables. It would make it easier to inspect definitions universe annotations without having to go to the end, write it and then hover.

This look-ahead should obviously only happen when inspecting the name of a Definition or Lemma etc.

@Alizter Alizter added the kind: bug Something isn't working label Nov 19, 2024
@ejgallego
Copy link
Owner

That's a good idea, IMHO implementing #322 would be enough to implement this cleanly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants