a structural diff that understands syntax 🟥🟩
 
 
 
 
 
Go to file
Patrick Förster eb552c7022
Add missing citation commands (#115)
Adds the following citation commands:
- `\citeA`
- `\citeR`
- `\citeS`
- `\citeyearR`

Fixes #94.
2024-04-01 15:38:05 +07:00
.github Remove unused update workflow 2024-04-01 14:46:06 +07:00
benches BREAKING: Don't check in generated parser.c file (#114) 2024-04-01 14:31:04 +07:00
bindings BREAKING: Don't check in generated parser.c file (#114) 2024-04-01 14:31:04 +07:00
examples Add parser benchmark 2022-01-29 10:42:34 +07:00
src BREAKING: Don't check in generated parser.c file (#114) 2024-04-01 14:31:04 +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
.editorconfig BREAKING: Don't check in generated parser.c file (#114) 2024-04-01 14:31:04 +07:00
.gitattributes BREAKING: Don't check in generated parser.c file (#114) 2024-04-01 14:31:04 +07:00
.gitignore BREAKING: Don't check in generated parser.c file (#114) 2024-04-01 14:31:04 +07:00
.prettierrc Initial commit 2020-11-25 17:55:39 +07:00
CHANGELOG.md Add missing citation commands (#115) 2024-04-01 15:38:05 +07:00
Cargo.toml BREAKING: Don't check in generated parser.c file (#114) 2024-04-01 14:31:04 +07:00
LICENSE Simplify parsing of special LaTeX commands 2021-12-27 13:22:53 +07:00
Makefile BREAKING: Don't check in generated parser.c file (#114) 2024-04-01 14:31:04 +07:00
Package.swift BREAKING: Don't check in generated parser.c file (#114) 2024-04-01 14:31:04 +07:00
README.md BREAKING: Don't check in generated parser.c file (#114) 2024-04-01 14:31:04 +07:00
binding.gyp BREAKING: Don't check in generated parser.c file (#114) 2024-04-01 14:31:04 +07:00
grammar.js Add missing citation commands (#115) 2024-04-01 15:38:05 +07:00
package-lock.json Bump version to v0.4.0 2024-04-01 14:44:40 +07:00
package.json Bump version to v0.4.0 2024-04-01 14:44:40 +07:00
pyproject.toml BREAKING: Don't check in generated parser.c file (#114) 2024-04-01 14:31:04 +07:00
setup.py BREAKING: Don't check in generated parser.c file (#114) 2024-04-01 14:31:04 +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.

To generate the parser, run

npx tree-sitter generate

after checking out the 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.