Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding another library for syntax highlighting. #105

Open
redvers opened this issue Jun 9, 2021 · 5 comments
Open

Adding another library for syntax highlighting. #105

redvers opened this issue Jun 9, 2021 · 5 comments

Comments

@redvers
Copy link

redvers commented Jun 9, 2021

Greetings, I'm trying to build some slides around the pony language but alas the package on hackage doesn't seem to have that language support.

It's in the kate database so I have the xml file.

My question really is how would I go about adding it?

(Note: if I call pandoc directly at the command-line like so:

pandoc foo.md --syntax-definition pony.xml is sufficient for the resultant html to be marked up correctly (wrong workflow I know - but useful to know that my .xml definition is good).

Thanks!

Red

@jaspervdj
Copy link
Owner

Hi @redvers! There is a bit of a long dependency chain here:

  • Patat depends on Pandoc for parsing;
  • Pandoc depends on Skylighting for hightlighting;
  • Skylighting in turn pulls in the XML files from Kate.

It seems like the last Skylighting update was around 6 months ago. I assume that Pony will be included in the next release. However, that may still take a while. Alternatively, I can see if we can add a similar --syntax-definition flag to patat?

@redvers
Copy link
Author

redvers commented Jun 9, 2021

That would be amazing if you could ... I traced the dependencies down and I don't see how patat integrates with pandoc specifically.

I was chewing through the documentation and even tried to strace patat to see if I could see where it was pulling the ruby syntax from - even if I just swap out the files temporarily to get me moving :-)

(Obviously that's not a proper fix - but my presentation is in about a week so I'm resorting to hackery of the worst kind) :-)

@klarkc
Copy link

klarkc commented Sep 13, 2022

@jaspervdj the same way I am trying to syntax highlight PureScript with v0.8.7.0, but it does not work, the xml is there though. The file were added Jul 15, 2020, the skylighting-core in stack lock file is 0.13 (which is the latest one from 30 Jul 2022), so it seems that skylighting-core is being updated without pulling all files in KDE's repo

@jaspervdj
Copy link
Owner

@klarkc Yeah, it seems like PureScript is not there yet... maybe you can file a PR against skylighting to add it from the KDE repos? I'm tempted to work on an extra syntax highlighting flag at some point, but I'm not sure if it will be soon.

@klarkc
Copy link

klarkc commented Oct 28, 2022

Added jgm/skylighting#158

jaspervdj added a commit that referenced this issue Aug 11, 2023
This allows users to add custom kate highlighting XML files in the settings:

    ---
    patat:
      syntaxDefinitions:
      - 'impurescript.xml'
    ...

    Here is some *im*purescript:
    
    ```impurescript
    ...
    ```

See also #105
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants