tree-sitter-grammars / tree-sitter-markdown

Markdown grammar for tree-sitter
MIT License
375 stars 45 forks source link

Injection for LaTeX blocks #57

Closed brdoney closed 1 year ago

brdoney commented 1 year ago

Although it does not appear to have been added to the GFM spec, GitHub recently added support for LaTeX rendering on their website using $ and $$ blocks. It is more formally outlined here.

Accordingly, It would be amazing if the parser could be extended to detect LaTeX blocks as marked by $ and $$ and provide injections for them.

danjenson commented 1 year ago

Second this, it would be great because I often write latex in markdown with mathjax

MDeiml commented 1 year ago

Good suggestion. This shouldn't be too much of a problem to implement.

SichangHe commented 1 year ago

Looking forward to this as well!

Entoryvekum commented 1 year ago

Looking forward to the implementation!

MDeiml commented 1 year ago

FYI, there is a working PR for this, which should be able to be merged soon #71

MDeiml commented 1 year ago

As #71 is closed now, all that is needed is for injection of latex is editor-specific configuration. For people using neovim that means some very small changes in nvim-treesitter. I'm happy to help if there are problems.