Adding basic Mojo lexer by hroemer · Pull Request #2691 · pygments/pygments
basic implementation for #2515 based upon PythonLexer
Thanks for guiding me along. I tested it locally (e.g. pygments -O full,style=emacs,linenos=1 -o test.html ...) and unfortunately was in a little rush here not reading the docs. I will add an according test file and output in the next couple of days, hopefully doing it more properly that time.
@Anteru I am currently struggling with tox. The command mentioned in the docs is not working out for me. I get tox: error: unrecognized arguments: --update-goldens. It works when adding the run command, but I cannot reason about the output, yet.
I guess I need to dig more into tox / pygments.
One general question as I don't have any experience with tox, but have done snapshot based testing (pytest / jest) in the past. Are the lexer tests similar to that?
Cheers
The command mentioned in the docs is not working out for me. I get tox: error: unrecognized arguments: --update-goldens.
It's tox -- --update-goldens, mind the extra --.
One general question as I don't have any experience with tox, but have done snapshot based testing (pytest / jest) in the past. Are the lexer tests similar to that?
Yes. And they're done with pytest, tox is just a test runner which saves you the time to install pytest in a virtual environment.
Thanks for your quick response and sorry for the delay. Github's device verification currently has a massive delay for emails. Login failed for 2 days now.
Actually I did use the double-dash, but I wasn't aware of tox automatic venv handling.
Thus, running tox "inside" another venv (PDM) didn't work out well.
Anyway, I got it working now and prepared snippets / examples.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters