Packages
tree_sitter_language_pack
1.6.2
1.20.0
1.19.1
1.19.0
1.18.0
1.17.0
1.16.2
1.16.1
1.15.12
1.15.8
1.15.7
1.14.3
1.14.2
1.14.1
1.14.0
1.13.7
1.13.6
1.13.5
1.13.4
1.13.3
1.13.2
1.13.1
1.13.0
1.12.5
1.12.4
1.12.3
1.12.2
1.12.1
1.12.0
1.11.1
1.11.0
1.11.0-rc.2
1.10.9
1.10.8
1.10.7
1.10.6
1.10.3
1.10.2
1.10.1
1.9.1
1.9.0
1.9.0-rc.55
1.9.0-rc.54
1.9.0-rc.53
1.9.0-rc.52
1.9.0-rc.51
1.9.0-rc.50
1.9.0-rc.49
1.9.0-rc.43
1.9.0-rc.41
1.9.0-rc.40
1.9.0-rc.39
1.9.0-rc.38
1.9.0-rc.36
1.9.0-rc.33
1.9.0-rc.32
1.9.0-rc.30
1.9.0-rc.28
1.9.0-rc.27
1.9.0-rc.26
1.9.0-rc.25
1.9.0-rc.24
1.9.0-rc.23
1.9.0-rc.22
1.9.0-rc.21
1.9.0-rc.20
1.9.0-rc.19
1.9.0-rc.17
1.9.0-rc.16
1.9.0-rc.15
1.9.0-rc.14
1.9.0-rc.13
1.9.0-rc.12
1.9.0-rc.11
1.9.0-rc.9
1.9.0-rc.8
1.9.0-rc.7
1.9.0-rc.6
1.8.1
1.8.0
1.8.0-rc.44
1.8.0-rc.43
1.8.0-rc.42
1.8.0-rc.41
1.8.0-rc.40
1.8.0-rc.39
1.8.0-rc.38
1.8.0-rc.37
1.8.0-rc.26
1.8.0-rc.24
1.8.0-rc.23
1.8.0-rc.22
1.6.2
1.6.1
1.6.0
1.5.0
1.4.2
1.4.1
1.4.0
1.3.3
1.3.2
1.1.1
1.1.0
1.0.0
1.0.0-rc.12
1.0.0-rc.11
1.0.0-rc.10
1.0.0-rc.9
1.0.0-rc.8
1.0.0-rc.7
1.0.0-rc.6
1.0.0-rc.5
1.0.0-rc.4
Pre-compiled tree-sitter grammars for 371 programming languages
Current section
Files
Jump to
Current section
Files
tree_sitter_language_pack
README.md
README.md
<!-- Generated by scripts/generate_readme.py. DO NOT EDIT. -->
# tree-sitter-language-pack — Elixir
<div align="center" style="display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 20px 0;">
<!-- Language Bindings --> <a href="https://crates.io/crates/tree-sitter-language-pack">
<img src="https://img.shields.io/crates/v/tree-sitter-language-pack?label=Rust&color=007ec6" alt="Rust">
</a> <a href="https://pypi.org/project/tree-sitter-language-pack/">
<img src="https://img.shields.io/pypi/v/tree-sitter-language-pack?label=Python&color=007ec6" alt="Python">
</a> <a href="https://www.npmjs.com/package/@kreuzberg/tree-sitter-language-pack">
<img src="https://img.shields.io/npm/v/@kreuzberg/tree-sitter-language-pack?label=Node.js&color=007ec6" alt="Node">
</a> <a href="https://www.npmjs.com/package/@kreuzberg/tree-sitter-language-pack-wasm">
<img src="https://img.shields.io/npm/v/@kreuzberg/tree-sitter-language-pack-wasm?label=WASM&color=007ec6" alt="Wasm">
</a> <a href="https://central.sonatype.com/artifact/dev.kreuzberg/tree-sitter-language-pack">
<img src="https://img.shields.io/maven-central/v/dev.kreuzberg/tree-sitter-language-pack?label=Java&color=007ec6" alt="Java">
</a> <a href="https://github.com/kreuzberg-dev/tree-sitter-language-pack/tree/main/packages/go">
<img src="https://img.shields.io/github/v/tag/kreuzberg-dev/tree-sitter-language-pack?label=Go&color=007ec6" alt="Go">
</a> <a href="https://www.nuget.org/packages/TreeSitterLanguagePack">
<img src="https://img.shields.io/nuget/v/TreeSitterLanguagePack?label=C%23&color=007ec6" alt="Csharp">
</a> <a href="https://packagist.org/packages/kreuzberg/tree-sitter-language-pack">
<img src="https://img.shields.io/packagist/v/kreuzberg/tree-sitter-language-pack?label=PHP&color=007ec6" alt="Php">
</a> <a href="https://rubygems.org/gems/tree_sitter_language_pack">
<img src="https://img.shields.io/gem/v/tree_sitter_language_pack?label=Ruby&color=007ec6" alt="Ruby">
</a> <a href="https://hex.pm/packages/tree_sitter_language_pack">
<img src="https://img.shields.io/hexpm/v/tree_sitter_language_pack?label=Elixir&color=007ec6" alt="Elixir">
</a> <a href="https://github.com/kreuzberg-dev/tree-sitter-language-pack/pkgs/container/tree-sitter-language-pack">
<img src="https://img.shields.io/badge/Docker-007ec6?logo=docker&logoColor=white" alt="Docker">
</a> <a href="https://github.com/kreuzberg-dev/tree-sitter-language-pack/tree/main/crates/ts-pack-ffi">
<img src="https://img.shields.io/badge/C-FFI-007ec6" alt="Ffi">
</a>
<!-- Project Info -->
<a href="https://github.com/kreuzberg-dev/tree-sitter-language-pack/actions">
<img src="https://img.shields.io/github/actions/workflow/status/kreuzberg-dev/tree-sitter-language-pack/ci-rust.yaml?branch=main&label=CI&color=007ec6" alt="CI">
</a>
<a href="https://github.com/kreuzberg-dev/tree-sitter-language-pack/blob/main/LICENSE">
<img src="https://img.shields.io/badge/License-MIT-007ec6.svg" alt="License">
</a>
<a href="https://github.com/kreuzberg-dev/homebrew-tap">
<img src="https://img.shields.io/badge/homebrew-ts--pack-007ec6?logo=homebrew" alt="Homebrew">
</a>
<a href="https://docs.tree-sitter-language-pack.kreuzberg.dev">
<img src="https://img.shields.io/badge/docs-kreuzberg.dev-007ec6" alt="Docs">
</a>
</div>
<div align="center">
<img width="3384" height="573" alt="Banner" src="https://github.com/user-attachments/assets/478a83da-237b-446b-b3a8-e564c13e00a8" />
</div>
<div align="center">
<a href="https://discord.gg/xt9WY3GnKR">
<img height="22" src="https://img.shields.io/badge/Discord-Join%20our%20community-7289da?logo=discord&logoColor=white" alt="Discord">
</a>
</div>
Elixir bindings for tree-sitter-language-pack with on-demand parser downloads.
## Installation
```elixir
{:tree_sitter_language_pack, "~> 1.0"}
```
## Quick Start
```elixir
# Optional: Pre-download specific languages for offline use
TreeSitterLanguagePack.init(["python", "elixir", "javascript"])
# List all available languages
TreeSitterLanguagePack.available_languages()
# Check if a language exists
TreeSitterLanguagePack.has_language("python")
# Auto-downloads language if not cached
ptr = TreeSitterLanguagePack.get_language_ptr("python")
# Pre-download languages for offline use
TreeSitterLanguagePack.download(["python", "javascript"])
result = TreeSitterLanguagePack.process(source, ~s({"language":"elixir"}))
IO.inspect(result)
```
## API Reference
### Language Discovery
- `available_languages()` -- list all supported language names
- `has_language(name)` -- check if a language is available
- `language_count()` -- total number of supported languages
### Language Detection
- `detect_language(path)` -- detect language from file path
- `detect_language_from_extension(ext)` -- detect language from a bare file extension
- `detect_language_from_path(path)` -- detect language from a file path
- `detect_language_from_content(content)` -- detect language from shebang line
- `extension_ambiguity(ext)` -- check if an extension is ambiguous (returns assigned language + alternatives)
### Parsing
- `get_parser(name)` / `parse_string(source, language)` -- parse source code into a syntax tree
### Download API
- `init(languages)` -- pre-download specific languages for offline use
- `download(languages)` -- download parsers on demand
### Intelligence
- `process(source, config)` -- extract structured analysis (functions, classes, imports, comments, chunks) from source code
### Syntax Highlighting Queries
- `get_highlights_query(language)` -- get bundled highlights.scm query for a language
- `get_injections_query(language)` -- get bundled injections.scm query
- `get_locals_query(language)` -- get bundled locals.scm query
For full documentation, see [kreuzberg.dev](https://docs.tree-sitter-language-pack.kreuzberg.dev).
## License
MIT -- see [LICENSE](https://github.com/kreuzberg-dev/tree-sitter-language-pack/blob/main/LICENSE) for details.
---
Part of [tree-sitter-language-pack](https://github.com/kreuzberg-dev/tree-sitter-language-pack) -- A comprehensive collection of tree-sitter language parsers with polyglot bindings.