# Supported Languages | Language | Extension | Crate | Version | |---|---|---|---| | Rust | `.rs` | `tree-sitter-rust` | 0.24 | | C | `.c`, `.h` (default) | `tree-sitter-c` | 0.24 | | C++ | `.cpp`, `.cc`, `.cxx`, `.hpp`, `.hh`, `.hxx`, `.h` (when C++ syntax is detected) | `tree-sitter-cpp` | 0.23 | | Python | `.py`, `.pyi` | `tree-sitter-python` | 0.25 | | JavaScript | `.js`, `.mjs`, `.cjs`, `.jsx` | `tree-sitter-javascript` | 0.25 | | TypeScript | `.ts`, `.mts`, `.cts` | `tree-sitter-typescript` | 0.23 | | TSX | `.tsx` | `tree-sitter-typescript` | 0.23 | | Go | `.go` | `tree-sitter-go` | 0.25 | | PHP | `.php`, `.phtml` | `tree-sitter-php` | 0.24 | | Java | `.java` | `tree-sitter-java` | 0.23 | | Kotlin | `.kt`, `.kts` | `tree-sitter-kotlin` | 0.3.5 * | | Swift | `.swift` | `tree-sitter-swift` | 0.7 | | C# | `.cs` | `tree-sitter-c-sharp` | 0.23 | | Bash | `.sh`, `.bash`, `.zsh` | `tree-sitter-bash` | 0.25 | | Ruby | `.rb`, `.rake`, `.gemspec` | `tree-sitter-ruby` | [owayo/tree-sitter-ruby](https://github.com/owayo/tree-sitter-ruby) | | Zig | `.zig`, `.zon` | `tree-sitter-zig` | 1.1 | All 16 languages get precise symbol extraction through tree-sitter queries. Ruby supports Unicode identifiers, and method names containing characters subject to simple case folding, such as `ſ` and `K`, are extracted without gaps. Index assignments with spaces, `{}` right after unparenthesized lambda parameters, empty regular expressions, a block right after an unparenthesized call, and heredocs with an empty identifier also parse without syntax errors. `.h` is treated as a C header by default. It is parsed as C++ only when it contains markers of C++-only syntax and the C++ parser gives clearly fewer parse errors. This keeps C headers from being treated as C++ by accident, while `symbols` / `review` / `dead-code` do not miss definitions in C++ headers such as `class Foo { public: ... }` or `struct X : Base {}`. > **\* About the Kotlin version:** `tree-sitter-kotlin` 0.3.8 and later depend on `tree-sitter` `>=0.21, <0.23`. `tree-sitter` in that range declares `links = "tree-sitter"`, just like the 0.27 that astro-sight itself uses. Cargo allows only one package with the same `links` value in a dependency graph, so dependency resolution fails. `tree-sitter` 0.20, which 0.3.5 depends on, does not declare `links` and can coexist with 0.27, so the dependency is pinned to 0.3.5. > > ```text > error: failed to select a version for `tree-sitter`. > ... required by package `tree-sitter-kotlin v0.3.8` > versions that meet the requirements `>=0.21, <0.23` are: 0.22.6, 0.22.5, 0.22.4, 0.22.3, 0.22.2, 0.22.1, 0.21.0 > > package `tree-sitter` links to the native library `tree-sitter`, but it conflicts with a previous package which links to `tree-sitter` as well: > package `tree-sitter v0.27.0` > ``` `.zsh` files and zsh shebang scripts use the Bash grammar, not a native zsh parser. When parsing fails, `symbols` and `ast` identify this fallback in a diagnostic. Declarations inside `ERROR` regions may be absent from `symbols`; recognizable top-level declaration headers appear as `kind: "unknown"` in `refs`.