Stream: Elpi users & devs

Topic: Pygments/minted theme for Coq-Elpi


view this post on Zulip Enzo Crance (Jun 13 2023 at 09:53):

Hello. Is there any syntax colour theme for Coq-Elpi in the Python Pygments library? This would allow colouring Elpi code with the minted library in LaTeX. If there is not, I might create one and make it public in the following weeks.

view this post on Zulip Pierre Roux (Jun 13 2023 at 10:00):

Apparently there is https://pygments.org/docs/lexers/#lexer-for-the-elpi-programming-language

view this post on Zulip Enzo Crance (Jun 13 2023 at 10:02):

Great! I expected a file on a GitHub repository to add manually to Pygments, but it has been added to the official list of supported languages. Thanks for the pointer.

view this post on Zulip Enzo Crance (Jun 13 2023 at 10:03):

Have you used it? Do you know if it supports quoting Coq terms? (switching to the Coq parser when under brackets {{ }})
I am not sure I need this feature but asking just in case

view this post on Zulip Kazuhiko Sakaguchi (Jun 13 2023 at 10:11):

Enzo Crance said:

Have you used it? Do you know if it supports quoting Coq terms? (switching to the Coq parser when under brackets {{ }})
I am not sure I need this feature but asking just in case

https://github.com/gares/hierarchy-builder-paper/blob/master/elpi.py cc: @Enrico Tassi

view this post on Zulip Enrico Tassi (Jun 13 2023 at 12:00):

The lexer in the main repo does not interleave with Coq, it only understands {{ and lp:X, all the rest is black.
Also, there was a bug with {{ which I recently fixed, but I don't know if they made a release yet.

The lexer up there should work fine, just put it in your sources, but I doubt you'll have a lot of Coq terms, so the upstream lexer may just be fine.


Last updated: Oct 13 2024 at 01:02 UTC