a structural diff that understands syntax 🟥🟩
 
 
 
 
 
Go to file
dependabot[bot] fb11c64a02
Bump prettier from 2.8.8 to 3.0.3 (#95)
2024-04-01 09:05:44 +07:00
.github Bump actions/checkout from 3 to 4 (#96) 2024-04-01 09:05:35 +07:00
benches Simplify grammar structure 2022-02-02 20:18:05 +07:00
bindings Add Swift Package Manager support 2023-02-24 08:56:56 +07:00
examples Add parser benchmark 2022-01-29 10:42:34 +07:00
src Update generated parser 2024-03-22 20:41:15 +07:00
test/corpus Merge pull request #102 from gi1242/bibfixes 2024-02-14 21:07:48 +07:00
.clang-format Simplify parsing of special LaTeX commands 2021-12-27 13:22:53 +07:00
.gitattributes Simplify parsing of special LaTeX commands 2021-12-27 13:22:53 +07:00
.gitignore Add Swift Package Manager support 2023-02-24 08:56:56 +07:00
.prettierrc Initial commit 2020-11-25 17:55:39 +07:00
CHANGELOG.md Start tracking changelog 2023-04-16 11:26:11 +07:00
Cargo.toml Update criterion requirement from 0.4.0 to 0.5.1 (#88) 2023-06-01 19:53:17 +07:00
LICENSE Simplify parsing of special LaTeX commands 2021-12-27 13:22:53 +07:00
Makefile Bump version to 0.3.0 2022-10-26 10:55:26 +07:00
Package.swift Fix Package.swift indentation 2023-02-24 09:04:37 +07:00
README.md Update README 2023-04-16 11:26:15 +07:00
binding.gyp Simplify parsing of special LaTeX commands 2021-12-27 13:22:53 +07:00
grammar.js fix: Allow optional argument for \author 2024-03-21 23:06:30 +07:00
package-lock.json Bump prettier from 2.8.8 to 3.0.3 (#95) 2024-04-01 09:05:44 +07:00
package.json Bump prettier from 2.8.8 to 3.0.3 (#95) 2024-04-01 09:05:44 +07:00

README.md

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.