Hi all,
The
pull request has been submitted to the Pygments package. However, it seems development suffers from lack of dev-time.In the mean time, you can check out my branch at
https://bitbucket.org/hectorfmedinaa/pygments-main/src/default/ Installation instructions are located in the readme (i.e. just
$ ./setup.py install or
$ ./setup.py develop --user if you want to edit the source & create styles)
As the lexer structure used is similar to that used by CodeMirror, we may be enhancing the Kappaapp & the GUI's lexer down the line. So users are encouraged to use & abuse it (and then complain to me, and maybe "the maintainer of the KaSim documentation" ;)
As for the pygments tokens, I deconstructed Kappa to the bones, so there is a LOT of customization about how stuff is rendered. See the pygments-main/pygments/tokens_for_kappa.py file to see the token tree / hierarchy. In my use case, I highlight edit notation operations (e.g. bonds in red, internal states in blue, counter stuff in green, agent creation/deletion in bold with red background), and put agent names in bold (checkout the styles folder). The lexer can distinguish agent names from variables (duh), and even the difference between a counter declaration and a counter edit operation (which the GUI can't... just sayin'...).
All the best,
Hector