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

Typescript syntax highlighting support #513

Closed
geelen opened this issue Jul 4, 2023 · 3 comments · Fixed by #525
Closed

Typescript syntax highlighting support #513

geelen opened this issue Jul 4, 2023 · 3 comments · Fixed by #525

Comments

@geelen
Copy link

geelen commented Jul 4, 2023

Just trying this project out, and it appears it has readymade support for a bunch of languages: rust, go, javascript, python, sh etc, which is great! But if I try ts or typescript it errors with the following message:

⚠ >o_o< WARNING: Found syntax highlight language annotation `ts` which is not currently supported. The annotated block will be shown as plaintext. Please file an issue https://github.com/axodotdev/oranda/issues/new to let us know you'd like to see it supported.
 WARN Found syntax highlight language annotation `ts` which is not currently supported. The annotated block will be shown as plaintext. Please file an issue https://github.com/axodotdev/oranda/issues/new to let us know you'd like to see it supported.
⚠ >o_o< WARNING: Found syntax highlight language annotation `typescript` which is not currently supported. The annotated block will be shown as plaintext. Please file an issue https://github.com/axodotdev/oranda/issues/new to let us know you'd like to see it supported.
 WARN Found syntax highlight language annotation `typescript` which is not currently supported. The annotated block will be shown as plaintext. Please file an issue https://github.com/axodotdev/oranda/issues/new to let us know you'd like to see it supported.

Is there an upstream dependency for syntax highlighting I should chase to add TS support?

@ashleygwilliams
Copy link
Member

hey @geelen! thanks for trying out oranda- we currently use syntect for highlighting, with the Material theme. thankfully- there are ways to add syntax support without having to bug either Material or syntect for support.

we have a small section in our docs in the contributing section on this: https://opensource.axo.dev/oranda/book/contributing.html#updating-syntax-highlighting-languages
and you can see what we did to support toml here: #452.

more specifically, i think we can snag the syntax file from here: https://github.com/microsoft/TypeScript-TmLanguage, and handle it like we do the toml one here https://github.com/axodotdev/oranda/pull/452/files#diff-4aa0802775692d0fe947fe27ce9a4faa7c6e431bba4709e67cc6888fc2d5bd5fR59

let me know if you're interested in trying or otherwise i'll have someone from the team pick it up before our next release!

@geelen
Copy link
Author

geelen commented Jul 4, 2023

Oh hey! Yeah sorry I found that docs section and followed it through to find trishume/syntect#447 then... decided to just use js syntax for now cause it's easier!

Then I got distracted by #514 so I'm looking at that now.

Glad there's a workaround for TS though, but for my needs I think I can live with JS for now.

@shadows-withal
Copy link
Contributor

we should definitely support TS syntax sooner or later, probably in the next release

@shadows-withal shadows-withal added this to the oranda-0.2.0 milestone Jul 4, 2023
shadows-withal pushed a commit that referenced this issue Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants