tree-sitter-langs
tree-sitter-langs copied to clipboard
Add support for Latex
Add support for latex using this grammar. Still working on the queries.
Hi! I attempted to make a TS major-mode for latex a few months ago. It didn't get far because of frustration with latex-lsp's grammar, but maybe some of the queries I wrote would be useful here. My main focus was good math highlighting, and I did get some of the way there before quitting due to the grammar's lack of sensitivity. https://github.com/ymarco/qatex (git blame would probably be good to see my reasoning regarding queries; I didn't do a whole lot of documentation in comments unfortunately)
Thanks! I'll take a look at this as soon as I have some time. I ran into a similar frustration and stopped making as much progress. I may just break down and write my own grammar.
I've added LaTex support in #230, but there is no highlight.scm
. Feel free to open another PR for the highlighting!