[WIP] Tree-sitter for LaTeX
Aerijo opened this issue · 4 comments
Things to do:
- Refine the grammar itself to support everything the TextMate one does (where possible; injections may be out of our control for now)
- Fix up all the scopes to match the existing ones as closely as reasonable (or use this as a chance to start fresh?)
- Set up CI to prebuild the parser with
prebuild
and upload to GitHub on each release. Needed for users without access to build tools. - Lock down the parser version when the above is settled
- Remove
private: true
frompackage.json
and add said dependencies when ready - Merge the TS biber support while we're at it
Please comment with any other concerns that should be addressed before merging
@yitzchak AFAIK injections only work TS to TS, so each language we currently have explicit support for would need their own TS parser, and that could take a while.
Still, that looks like a good thing to add. I'll merge a PR you submit
@PgLoLo No, nothing yet. What you are running into can be solved with the grammar-token-limit
package.
The biggest problem I had was that the parser was too brittle, basically failing to parse anything if there was any invalid input, so as you type the text would just be flashing as it parses and errors as you go. So this, the existing grammar being mostly good enough, and other priorities meant no work on the TS grammar.