tree-sitter-langs icon indicating copy to clipboard operation
tree-sitter-langs copied to clipboard

Add support for Latex

Open sgpthomas opened this issue 2 years ago • 2 comments

Add support for latex using this grammar. Still working on the queries.

sgpthomas avatar Jul 12 '22 20:07 sgpthomas

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)

ymarco avatar Sep 02 '22 09:09 ymarco

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.

sgpthomas avatar Sep 02 '22 16:09 sgpthomas

I've added LaTex support in #230, but there is no highlight.scm. Feel free to open another PR for the highlighting!

jcs090218 avatar Sep 02 '23 20:09 jcs090218