rouge-ruby / rouge

A pure Ruby code highlighter that is compatible with Pygments
https://rouge.jneen.net/
Other
3.33k stars 735 forks source link

Dhall language support #1054

Open MartinPotier opened 5 years ago

MartinPotier commented 5 years ago

Would it be possible to add Dhall syntax highlighting?

Here are a few syntax files as an example:

pyrmont commented 5 years ago

@MartinPotier Thanks for filing this issue :) Sorry it's taken so long to get back to you!

Rouge mostly relies on the support of our community for new language lexers. We have quite a backlog at the moment but always encourage new language lexer submissions to be submitted via PR. If you'd like to contribute, please feel free. The documentation is a little sparse at the moment but I'm looking to improve that. There is a draft of a new guide on lexer development that might be helpful :)

MartinPotier commented 4 years ago

Hey, I was going to open a new issue, when I realised I already did, a long time ago :)

My main problem is that I'm not at all familiar with ruby, while this project is used in Gitlab, which I use everyday. I'll ask if I can take some work time to work on this project, as it may be beneficial for other Dhall and Gitlab users.

Would you recommend some quick Ruby intro that would allow me to contribute here?

pyrmont commented 4 years ago

@MartinPotier Because Rouge's lexers are written in its own a domain-specific language, knowing Ruby shouldn't really be necessary. To be honest, it's more important to have a feel for regular expressions but that's not a Ruby thing and I'd recommend having a look for a tutorial written in the programming language you're most familiar with to get up to speed on those (if you're not already, of course).

Since the previous message, we do now have a guide on development environments (or there are instructions on how to use a Docker container if that's preferable) and a guide on lexer development. Those are really the best places to begin.

paulRbr commented 3 years ago

Another example of Dhall language color syntax grammar: prism-dhall rules