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

V3 Treesitter Engine #1020

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft

V3 Treesitter Engine #1020

wants to merge 14 commits into from

Conversation

vhyrro
Copy link
Member

@vhyrro vhyrro commented Aug 9, 2023

Would've been cooler if it were called the V8 engine but it's supposed to be the 3rd version of the parser so I can't just do that :p

It's finally here! The parser is so close to completion that I can already start migrating all of Neorg to the new engine. It's fast, it's much more reliable and it's 7.7x smaller than the previous iteration(s). And if it ever breaks, then it's simple to debug and actually consistent in when it errors in my experience. V1 would work for 90% of cases and then break super randomly in irreproducible environments.

Thanks to this we can also use treesitter as a source of truth for pandoc parsers or highlighting engines (looking at you, github) 👀

EDIT: It also now compiles natively on MacOS! Wohoo!!!

TODOs

There's a lot to do for this PR alone, and there's still some preliminary stuff. Here's the checklist:

  • Implement inline maths and inline macros parsing and make conflicts work as intended within TS.
  • Implement free-form attached modifiers in the parser. These are pretty hard, but they're about halfway there.
  • Test the parser in MacOS environments to see if it compiles natively without hacks.
  • Fix up some odd edge cases
  • Put it all in Neorg!

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

Successfully merging this pull request may close these issues.

None yet

1 participant