Typescript syntax highlighting support
geelen opened this issue · comments
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?
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!
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.
we should definitely support TS syntax sooner or later, probably in the next release