ziglang / zig

General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
https://ziglang.org
MIT License
34.81k stars 2.54k forks source link

send patch to add zig syntax highlighting to pygments #2832

Closed andrewrk closed 5 years ago

andrewrk commented 5 years ago

http://pygments.org/languages/

why not write your own? Contributing to Pygments is easy and fun. Take a look at the docs on lexer development and contact details.

This would provide Zig syntax highlighting on SourceHut ~and I believe Stack Overflow~.

zimmi commented 5 years ago

Stack Overflow uses code-prettify (source).

Not sure if this is possible, but it would be pretty neat to write a compiler for PEGs that generates code-prettify and pygments lexers and then feed it the zig-spec.

andrewrk commented 5 years ago

pygments just gained zig support upstream: https://bitbucket.org/birkenfeld/pygments-main/pull-requests/820/added-lexer-for-zig-programming-language/diff