Skip to content

gi1242/tree-sitter-latex

 
 

Repository files navigation

tree-sitter-latex

CI npm

This repo provides a LaTeX grammar for the tree-sitter parser generator.

Originally, this grammar is based off the parser of the texlab language server and primarily focuses on the constructs that are relevant for the language server.

This repository does not provide the accompanying highlighting definitions, instead they live in the nvim-treesitter repository.

Limitations

As widely known, parsing LaTeX is Turing complete so there is no way to handle every construct in a tree-sitter grammar. Instead, the grammar relies on a best effort approach while focusing on the LaTeX specific constructs like environments or sections instead of dealing with TeX internals like catcode.

About

LaTeX grammar for tree-sitter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 72.2%
  • Rust 11.2%
  • Makefile 10.0%
  • Swift 2.7%
  • C++ 2.2%
  • Python 1.1%
  • C 0.6%