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

Non currently supported languages in the future; what happens now? #488

Closed
ericarthurc opened this issue Aug 24, 2023 · 6 comments
Closed

Comments

@ericarthurc
Copy link

First of all; just wanted to say thank you to the devs working on this library; its pretty amazing and works awesomely.

I know questions like this get asked all the time here; but my question is a little different. I read through a lot of github issues asking for 'this or that' language and it looks like the syntax support has been finalized in the devs mind. Their project, their free work, no complaints here.

My questions is where do we go from here? For example I am working on a markdown parser project that uses comrak for markdown parsing and then syntect to apply css classes to the code blocks; then I handle the css myself. I ran into an issue the other day where my code blocks using ```nim were causing a panic error on compile. Then I realized nim isn't a supported language of the project; and I know typescript is another hot topic around here.

So is the syntax API is pretty much set in stone and we aren't getting new language support. Where should be look for this functionality? Just asking if anyone has advice or knows of another rust based library that can support these workflows?

I have looked through crates and github and Syntect as of this moment is about it. And please hear me I am not complaining; again its their project, their time. I just dont want to switch to Go hahaha!

@ericarthurc
Copy link
Author

I was reading through the older typescript 'issues' posted and there was some talk about maybe expanding the language support ourselves with .tmLanguage files?
Is there a guide or some advice to handling this?

@keith-hall
Copy link
Collaborator

So is the syntax API is pretty much set in stone and we aren't getting new language support.

This is just a library, which happens to come with some language support by default (which is unlikely to change much), but there's nothing to stop you using whatever languages you want...

sharkdp/bat#919 (comment) may interest you

@ericarthurc
Copy link
Author

So is the syntax API is pretty much set in stone and we aren't getting new language support.

This is just a library, which happens to come with some language support by default (which is unlikely to change much), but there's nothing to stop you using whatever languages you want...

sharkdp/bat#919 (comment) may interest you

Hey Keith, thanks for the reply 😁 appreciate it.
I did look at bat, but they don't currently have a way to just apply classes on the parsed code blocks like syntect. :/

But really appreciate the work you have done on syntect!
Thanks

@keith-hall
Copy link
Collaborator

Ah I confess I didn't look at it too closely, sorry. I was expecting it to just be a binary syntax and theme blob for use with syntect. I know other projects use the binary dumps from the bat project quite happily.

Thanks for the kind words btw.

You may need to wait for someone to progress with #168 then.

I was reading through the older typescript 'issues' posted and there was some talk about maybe expanding the language support ourselves with .tmLanguage files? Is there a guide or some advice to handling this?

Technically tmLanguage supports a subset of sublime-syntax so it should mainly be a case of parsing the XML (or JSON file if going down the vscode compatibility route, but that may support things that Sublime and thus syntect don't) into the existing data structures (which iirc may have some unfortunately named parts as they were only designed/expected to work with yaml originally)

@keith-hall
Copy link
Collaborator

Just asking if anyone has advice or knows of another rust based library that can support these workflows?

Maybe there are Rust bindings for tree-sitter? Otherwise I don't know I'm afraid.

@Enselic
Copy link
Collaborator

Enselic commented Dec 29, 2023

Thank you for the kind words!

I don't think there is anything actionable here? nim and ts are supported, as long as you hand a sublime syntax definition to syntect of those languages. Closing.

@Enselic Enselic closed this as not planned Won't fix, can't repro, duplicate, stale Dec 29, 2023
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

3 participants