Skip to content
项目

casouri/tree-sitter-module

在 GitHub 查看

casouri/tree-sitter-module has 201 GitHub stars and 63 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-21 00:38 UTC. Last push 2026-04-16.

这些数字如何统计

实测星标增长

24小时
0
7天
正在收集历史
15天
正在收集历史
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

关于

Building script for tree-sitter language definitions

开发工具

README.md

原文

This is an unofficial script that builds tree-sitter grammars that can be used by Emacs 29 and above.

Tree-sitter language grammars are just dynamic library object files. You need git and a C/C++ compiler to build them.

To build the language grammar for a particular language, run

./build.sh <language>

e.g.,

./build.sh html

The dynamic library will be in directory /dist.

To build all modules at once, run

./batch.sh

This gives you C, JSON, Go, HTML, Javascript, CSS, Python, Typescript (tsx), C# (csharp), C++ (cpp), Rust, etc, etc. The complete list is in batch.sh. If you don't see your favoriate language in the list, submit a PR.

You can enable parallel build with the JOBS variable, like this:

JOBS=8 ./batch.sh

NEW

I vibe-coded a convenient CLI for building and installing grammars and managing versions. The CLI still uses build.sh and batch.sh to do most of the work.

./langman.py --help usage: langman.py [-h] {build,install,version} ...

Tree-sitter grammar builder and installer

positional arguments: {build,install,version} build Build grammar(s) install Build and install grammar(s) version Show installed version

optional arguments: -h, --help show this help message and exit

Examples: langman.py build python langman.py build --version v0.23.2 python langman.py build # Build all languages langman.py install python langman.py install # Install all languages langman.py version python

Environment: INSTALL_DIR Override default install directory (~/.emacs.d/tree-sitter)

Caching: Versioned builds (--version) are cached and reused on subsequent builds. HEAD builds (no --version) always rebuild from the latest commit.

Note: On mac and linux, version is stored in the grammar file using xattr, on windows, the version is stored in a separate version file alongside the grammar file.