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

Syntax Highlighting #39

Closed
nandac opened this issue Jan 5, 2024 · 3 comments
Closed

Syntax Highlighting #39

nandac opened this issue Jan 5, 2024 · 3 comments

Comments

@nandac
Copy link

nandac commented Jan 5, 2024

Dear Folks,

I would like to know how you have built syntax highlighting for Typst.

I am trying to build Syntax highlighting for Kate, which requires the building of an XML file of all the keywords available in the language which is difficult to do by hand.

I would like to know how you handle syntax highlighting and updating it as Typst changes.

I hope you can guide me in this regard.

Many thanks.

@olib14
Copy link

olib14 commented Jan 11, 2024

I'm a KDE contributor. There's no way to do this for Kate but to create an XML file defining the syntax:

https://invent.kde.org/frameworks/syntax-highlighting/-/tree/master/data/syntax

Interestingly enough some time ago I looked into the same thing and also found it to be difficult enough not to bother. I was interested in building a Qt app similar to Kile for Typst editing, with Kate and Okular parts.

This project seems to handle it here:

https://github.com/Cubxity/typstudio/blob/master/src/lib/editor/lang/typst-tm.json

@nandac
Copy link
Author

nandac commented Jan 11, 2024

@olib14 Thanks for the info. I guess I can build it by hand incrementally but it is going to take a while. If I do find an automatic way I will recommend the Kate developers to add a HOWTO.

@olib14
Copy link

olib14 commented Jan 11, 2024

Sure thing. Feel free to tag me on KDE's GitLab @olib if you ever make an MR - I'd be happy to test syntax highlighting.

Make sure to close this issue!

@nandac nandac closed this as completed Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants