jgm / skylighting

A Haskell syntax highlighting library with tokenizers derived from KDE syntax highlighting descriptions
192 stars 62 forks source link

Add syntax xml for Hare language #172

Open uvtc opened 1 year ago

uvtc commented 1 year ago

I believe the KDE xml file was just added for the Hare language.

https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/514 https://invent.kde.org/frameworks/syntax-highlighting/-/blob/master/data/syntax/hare.xml https://kate-editor.org/syntax/data/syntax/hare.xml

Can this be added to skylighting so that syntax highlighting for Hare will work in Pandoc?

jgm commented 1 year ago

You can use it already by using --syntax-definition with pandoc. As for inclusion as a default language in pandoc, it would depend on how widely used and established Hare is. It looks to be fairly new and in progress...so this may be premature.

uvtc commented 1 year ago

Didn't know about that --syntax-definition option. Thanks!

I'd assumed that, if the xml syntax file is in that KDE repo, then it's by default included in skylighting. That is, that (for skylighting) you'd just pull directly from whatever they have.

Does pandoc by default make use of every syntax highlighting file that skylighting has?

jgm commented 1 year ago

We don't pull in everything in the KDE repo, to keep the compile times and binary size lower.

uvtc commented 1 year ago

Hare has an official spec, has solid reference docs, and my impression is that it's all about being conservatively-developed and a "boring systems language" that'll stay stable after v1.0. That said, although there are a number of projects in Hare:

it's not yet widely-adopted.

jgm commented 1 year ago

I'm inclined to hold off for a while before adding it, to see how it develops, but if there's significant demand I could consider adding it. It's not urgent, because you can always use --syntax-definiton.