area / language-latex

Syntax highlighting for LaTeX for Atom.
Other
78 stars 47 forks source link

[WIP] Tree-sitter for LaTeX #201

Open Aerijo opened 5 years ago

Aerijo commented 5 years ago

Things to do:

Please comment with any other concerns that should be addressed before merging

yitzchak commented 5 years ago

I have some injection code at main.js

Aerijo commented 5 years ago

@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 commented 3 years ago

Is there any progress on transferring to the new tree-sitter? It is two years now, and it would be great to get rid of the highlighting line length limit:

image

Aerijo commented 3 years ago

@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.