jgm / skylighting

A Haskell syntax highlighting library with tokenizers derived from KDE syntax highlighting descriptions
189 stars 61 forks source link

Add 'gap' language #167

Closed ChrisJefferson closed 1 year ago

ChrisJefferson commented 1 year ago

Hi,

I want to use the 'gap' language (already upstream at: https://github.com/KDE/syntax-highlighting/blob/master/data/syntax/gap.xml ). I'm not totally sure how languages get added to skylighting? Are they only added when requested, or does some work need to be done on the upstream GAP syntax file?

jgm commented 1 year ago

No work needs to be done, but I don't add the whole kitchen sink in order not to slow down compile times and bloat the binary.

jgm commented 1 year ago

Note that you can already use this language by loading the syntax file dynamically. --syntax-definition with pandoc.

ChrisJefferson commented 1 year ago

One suggestion -- could there be a directory where I can put syntax definition files (or does one already exist?)

I'm not sure if this should be a suggestion here, or maybe in pandoc ( which already has --data-dir, so maybe syntax files could be stored in there?)

I suggest this as I'm using a program which uses pandoc, and I'm having trouble passing arguments (although I have hacked around that by making a pandoc wrapping script).