jgm / skylighting

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

Add `--list-styles` CLI option #141

Open not-my-profile opened 2 years ago

not-my-profile commented 2 years ago

Currently the values that the -S (--style) option accepts are only discoverable by looking at the soure code:

https://github.com/jgm/skylighting/blob/8b2b85aec695e6618720582f989e47691cb70b68/skylighting/bin/main.hs#L131-L139

I think it would make sense to introduce a --list-styles option that would just list the available styles:

$ skylighting --list-styles
pygments
espresso
kate
tango
haddock
monochrome
breeze-dark

Analogous to pandoc --list-highlight-styles. If --list-styles is introduced it probably makes sense to rename --list to --list-syntaxes for consistency.

jgm commented 2 years ago

Sure. Not a high priority for me, but I'd accept a PR.