Skip to content

Add color to more keywords #299

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

Merged
merged 38 commits into from
Dec 13, 2022
Merged

Add color to more keywords #299

merged 38 commits into from
Dec 13, 2022

Conversation

dlesbre
Copy link
Contributor

@dlesbre dlesbre commented Jul 8, 2022

This fixes #298
Adds missing syntax colors to:

  • keywords Instance, Program Instance, Coercion, Context, Include, Search, Structure, Generalizable All, Generalizable Variables Existing Instance, Existing Class, Variant, About, Locate, Inline (if after Variable, Hypothese,...), Let Fixpoint, Let CoFixpoint, Canonical, the Obligation commands, some Proof commands (Save, Abort, Undo, Restart, Focus...), Implicit Types, Typeclasses Opaque, Typeclasses Transparent
  • control-flow keyword fix ... for and where ... and.
  • brackets {| and |}
  • types : nat, bool, option, list, unit, sum, prod, comparison, Empty_set
  • constructors : tt, true, false, Some, None, S, O, inl, inr, pair, cons, Eq, Lt, Gt, id, ex, all and unique.
  • tactics : transitivity, etransitivity, f_equal, exfalso, replace, tauto, cycle, swap, revgoals, cycle, shelve, unshelve
  • tactic keywords : do (move from tactic to keyword), tryif once, at, only
  • snippets for Infix, match, Class/Record, Instance, Existing Instance, Generalizable ..., pose, destruct and replace
  • fix Variable (x: type)., Context {a: type} and Context `{a:type} not coloring.
  • fix Inductive > foo not coloring.
  • Color identifiers when defining Class and Record similarly to Inductive

This includes all changes from #279.

@dlesbre dlesbre changed the title Add color to "Instance" "Context" and "{|" brackets Add color to more keywords Jul 8, 2022
@thery
Copy link
Contributor

thery commented Dec 12, 2022

Look good to me. If no reaction, I will merge it tomorrow

@Blaisorblade
Copy link
Contributor

Currently testing locally, but this seems a clear improvement worth merging :-)

@Blaisorblade
Copy link
Contributor

FWIW, highlighting "built-in types" has effects like
image

and there was already some concern in #298 (comment). But on balance, this remains a net improvement that we can tweak later...

@thery
Copy link
Contributor

thery commented Dec 13, 2022

@Blaisorblade can I merge?

@thery
Copy link
Contributor

thery commented Dec 13, 2022

@dlesbre you are still doing some fixes I, great! Please tell me when you think it is ok and I will merge.

@thery thery modified the milestone: 0. Dec 13, 2022
@dlesbre
Copy link
Contributor Author

dlesbre commented Dec 13, 2022

I've been adding missing stuff as I noticed it missing since I opened the PR. The last update were just somethings I noticed today. I think you can merge this now if you want too.

I'll open a new PR if I find enough missing things to warrant that.

@thery thery added this to the 0.3.7 milestone Dec 13, 2022
@thery
Copy link
Contributor

thery commented Dec 13, 2022

@dlesbre Perfect. Thanks a lot!

@thery thery merged commit 86170c5 into rocq-prover:master Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing color for "Instance" and "Context" keyword
3 participants