elijah-potter / harper

The Grammar Checker for Developers
https://writewithharper.com
Apache License 2.0
1.89k stars 34 forks source link

Typst support #230

Open pinpox opened 1 month ago

pinpox commented 1 month ago

Similar to https://github.com/elijah-potter/harper/issues/56, I would like to propose support for typst. There is a pretty good working languageserver for it, in case that helps with implementation.

elijah-potter commented 1 month ago

Since the Typst parser is actually written in Rust, it should be relatively straightforward to make this happen. It's relatively low priority at the moment though, so unless someone else decides to pick this up, I can't give you a time estimate.

pinpox commented 1 month ago

unless someone else decides to pick this up, I can't give you a time estimate.

Would you be able to provide some guidance? I might find the time to submit a PR but don't really know where to start. Maybe there is some similar example ?

elijah-potter commented 3 weeks ago

You'll want to look at harper-core/src/parsers/Markdown. That's the implementation that wraps pulldown-cmark. You'll likely want to make a copy and swap out the innards for the Typst parser (which I believe is just a crate).