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

Feature request: showing the next bullet #643

Closed
toku-sa-n opened this issue Sep 29, 2023 · 13 comments · Fixed by #901
Closed

Feature request: showing the next bullet #643

toku-sa-n opened this issue Sep 29, 2023 · 13 comments · Fixed by #901
Labels
enhancement New feature or request

Comments

@toku-sa-n
Copy link

Hi. I'm using VsCoq, and it's pretty nice! However, I think it'd be great if VsCoq prints the next bullet on the completion of proof for a bullet.

Currently, VsCoq only says "No more subgoals".
29-09-2023_19:09:46_screenshot

Coqtail, a Vim plugin for Coq, has the feature like this.
29-09-2023_19:08:19_screenshot

I'm using VsCoq 2.0.1 and vscoq-language-server 2.0.1+coq8.18.

@rtetley rtetley added the enhancement New feature or request label Oct 2, 2023
@rtetley rtetley moved this to 📋 Backlog in VsCoq 2 roadmap Sep 6, 2024
@SkySkimmer
Copy link
Contributor

You probably want something like https://github.com/coq/coq/blob/a37a2e4bf622d7c2a6a0ec9fe9d58d981a142442/printing/printer.ml#L966-L972
The Proof_bullet.suggest says "focus next goal with bullet -"
pr_subgoals on bgoals = Proof.background_subgoals p does the actual goal printing

@gares
Copy link
Member

gares commented Sep 11, 2024

Thanks @SkySkimmer . If we add a quickfix for that in Coq, there is nothing to do here in VSCoq.

@SkySkimmer
Copy link
Contributor

SkySkimmer commented Sep 11, 2024

WDYM? Coq already prints this info (with coqtop in proof general)

@gares
Copy link
Member

gares commented Sep 11, 2024

I mean generating a proper quickfix as in LSP. Warnings as errors can carry one, maybe plain errors cannot yet.I don't recall the API.

I guess the only sensitive piece of info is the loc, I.e. the piece of text to be replaced by the right bullet. If it is a bad bullet, then it is the loc of the whole bullet. If it is a missing bullet, it must be some white space before the tactic.

@SkySkimmer
Copy link
Contributor

There is no warning or error involved here.

@gares
Copy link
Member

gares commented Sep 11, 2024

My guess is that no matter what you write after, you get an error saying that you need a bullet or that the bullet you write is wrong. That is the error we can suggest a fix for.

Maybe it is too convoluted to be usable, I would need to try.

Using the same api for code completion can work as well of course.

@TheoWinterhalter
Copy link

I think it should just replace the text that says "No more goals" which is incorrect and replace it with the one Coq outputs.

@rtetley
Copy link
Collaborator

rtetley commented Sep 12, 2024

I suppose we can do both ?

  • Write "There are unfocused goals, focus with blablabla" right after a bullet is solved
  • Add a quickfix suggesting a fix if a user writes anything else after ?

@rtetley
Copy link
Collaborator

rtetley commented Sep 12, 2024

Thanks to @SkySkimmer I now detect unfocused goal (see linked PR).
However all I do is write a message.
Seeing as we already have Shelved and Given Up tabs, would it not make sense to make a Unfocused tab ?
Or should I just display the unfocused goals like Coqtail does ?

@Durbatuluk1701
Copy link
Contributor

Thanks to @SkySkimmer I now detect unfocused goal (see linked PR). However all I do is write a message. Seeing as we already have Shelved and Given Up tabs, would it not make sense to make a Unfocused tab ? Or should I just display the unfocused goals like Coqtail does ?

I would advocate for automatically displaying the unfocused goals (or at the very least making an option to do so). If I have to mouse over to an Unfocused tab to see them I would likely just never do so.

@rtetley
Copy link
Collaborator

rtetley commented Sep 13, 2024

Okay so I came up with this:
Screenshot 2024-09-13 at 11 45 02

It displays all the unfocused goals but makes them all collapsed by default. WDYT ?

@rtetley rtetley moved this from 📋 Backlog to 👀 In review in VsCoq 2 roadmap Sep 13, 2024
@TheoWinterhalter
Copy link

Shouldn't it say "focus with bullet"?

@rtetley
Copy link
Collaborator

rtetley commented Sep 13, 2024

Good catch 😅

@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in VsCoq 2 roadmap Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants