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

Highlight more programming languages #675

Closed
persello opened this issue Apr 8, 2023 · 2 comments
Closed

Highlight more programming languages #675

persello opened this issue Apr 8, 2023 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@persello
Copy link

persello commented Apr 8, 2023

I see that languages such as Swift, Typescript, Nim and others are not supported by the syntax highlighter.

Even async/await keywords are not highlighted in Rust code.

Upon some investigation, I discovered that syntect uses a compressed version of a set of Sublime Text language support definitions.
The problem is that those definitions haven’t been updated (on syntect’s side) in a long time, as stated here. This makes me think that updating those definitions (and having Typst highlight more languages), will require an update to the syntect crate.

If we want to support more languages, how should we proceed?

@TheLostLambda
Copy link

I'm not sure how computationally burdensome using something like tree-sitter would be (https://crates.io/crates/tree-sitter) — it feels a bit overkill, but it seems like The Way Forward™ when it comes to language syntax support.

Perhaps I'm just too deep in Neovim-world though!

@laurmaedje
Copy link
Member

Duplicate of #356

@laurmaedje laurmaedje marked this as a duplicate of #356 Apr 11, 2023
@laurmaedje laurmaedje added the duplicate This issue or pull request already exists label Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants