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

Syntax highlighting #854

Open
8 of 13 tasks
Alizter opened this issue Oct 7, 2024 · 4 comments
Open
8 of 13 tasks

Syntax highlighting #854

Alizter opened this issue Oct 7, 2024 · 4 comments
Labels
kind: bug Something isn't working part: client (VSCode)

Comments

@Alizter
Copy link
Collaborator

Alizter commented Oct 7, 2024

Various vernac commands are highlighted incorrectly. It's difficult to be exhaustive, so we should keep this issue open to track them. Here are the ones I've come across so far:

  • Declare ML Module
  • Set Default Proof Mode
  • Set Strict Universe Declaration
  • Global Set Default Goal Selector "!" highlights Goal and Selector incorrectly separately
  • Create HintDb
  • Register
  • Add Search Blacklist
  • Add Printing Let
  • Hint Unfold
  • Scheme
  • Opaque
  • Monomorphic modifier
  • Polymophic modifier
@Alizter Alizter added kind: bug Something isn't working part: client (VSCode) labels Oct 7, 2024
@ejgallego
Copy link
Owner

This is something we inherit from C.J.'s VsCoq 1, I think that VSCoq 2 also uses the same file; maybe we could sync the effort on Zulip to improve this.

Of course we can add the LSP highlight method (semanticsToken) to coq-lsp, I am not sure about what the mapping for Coq would be.

@4ever2
Copy link
Contributor

4ever2 commented Nov 5, 2024

This is something we inherit from C.J.'s VsCoq 1, I think that VSCoq 2 also uses the same file; maybe we could sync the effort on Zulip to improve this.

VSCoq 2 also inherited the same file from VSCoq 1, however, all three versions have diverged since then. Interestingly VSCoq 1 seems to have the most up-to-date syntax grammar.

I have a local version of the grammar that fixes several of the issues mentioned and should be mostly up-to-date with Coq 8.20. I'd be happy to open a PR with the changes if you want.

@ejgallego
Copy link
Owner

Hi @4ever2 , indeed it hasn't been easy to coordinate that; I'd be amazing if you would open a PR updating our definitions!

Please don't forget to update the changelog so your contribution is credited properly.

@ejgallego
Copy link
Owner

@Alizter we can also implement semantic tokens, that should be easy for commands that are not defined in plugins.

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 part: client (VSCode)
Projects
None yet
Development

No branches or pull requests

3 participants