Open lgrosz opened 10 months ago
LaTeX is just a very complicated language to parse, with a lot of hard-coded commands that need to be supported. That just makes for a large (and expensive to load) grammar.
(You're lucky with your other grammars then; LaTeX is by far not the worst offender -- take a look at verilog
...)
That being said, I'm sure there's things that can be done to improve size and load speed (see, e.g., https://github.com/tree-sitter/tree-sitter/wiki/Tips-and-Tricks-for-a-grammar-author); help is surely welcome.
I will definitely take a look and see if I can contribute! I just noticed it was slow compared to other languages I have treesitter active for (I haven't use verilog for years!) and wanted to put an issue out.
For the following file...
When
ensure_installed = { ..., 'latex' }
, loading of this file takes multiple seconds. This only occurs once per instance of neovim. This is in stark contrast to any other treesitter grammar plugin I use.