-
Notifications
You must be signed in to change notification settings - Fork 9
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
LaTeX language injection #20
Comments
Other string macros to inject:
For the single/triple string problem, neovim has the handy |
Those are good calls. I didn't know about Maybe the Zed devs would be willing to provide |
tree-sitter-julia v0.23.1 comes with a new That should allow injections for LaTeXStrings. I've added |
That's good news! I'm happy to work on some queries, but I'm fairly busy in the immediate future so if anyone else is eager they can go ahead. |
@steffenhaug: zed-julia 0.1.3 is out and you can update within Zed. All string macros mentioned above are available. Feel free to open a new issue or PR if you miss something. |
Just like we currently inject regex syntax into regexes, and SQL syntax into
SQLStrings
, I think it would be nice to have LaTeX language injection into LaTeXStrings.I tried to implement this before, but couldn't make it as nice as i wanted, because the
TeX
grammar can't deal with the surroundingL"
andL"""
. For the Markdown, Regex and SQL injections, it just so happens that those parsers deal with the surrounding quotations reasonably well, but in general we can't expect parsers of other languages to robustly handle quotation in Julia.It would be nice if the tree-sitter parser created a child-node for string literals that contained just the content of the string, so it could be reparsed more easily.
I'm making this issue to gauge interest in this feature, make it searchable in case someone wonders why LaTeX strings are not highlighted, and to reference if we decide we need to bug the tree-sitter people about it.
The text was updated successfully, but these errors were encountered: