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

Add an Agda lexer #891

Merged
merged 2 commits into from Nov 25, 2023
Merged

Add an Agda lexer #891

merged 2 commits into from Nov 25, 2023

Conversation

DanilaFe
Copy link
Contributor

This PR adds an Agda lexer, generated from the Pygments version as follows:

python3 _tools/pygments2chroma_xml.py \
  pygments.lexers.haskell.AgdaLexer \
  > lexers/embedded/agda.xml

Interestingly, this didn't work out of the box: the script generated a token of type CommentDirective, which isn't supported by chroma. I replaced this token with CommentMultiline (because of its similarity to this token), and everything seemed to work.

Somehow, I'm the first one that needs this -- there isn't a corresponding feature request!

Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
@alecthomas
Copy link
Owner

Lovely, thanks for the contribution!

@alecthomas alecthomas merged commit 08be6f0 into alecthomas:master Nov 25, 2023
2 checks passed
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.

None yet

2 participants