Skip to content

Language Support

NestWeaver supports 32 programming languages through Tree-sitter grammars. Every language gets symbol extraction and cross-file resolution out of the box, and 21 of them also get type-aware call resolution that can trace obj.method() to the correct target class via AST-extracted type bindings.

Vue and Svelte files are parsed by extracting their <script> blocks and applying the JavaScript/TypeScript grammars, so they inherit the same resolution capabilities.

Languages with a _types.scm query file get full type-aware resolution (annotations, constructors, self/this, return types). Languages without one still get accurate symbol extraction and cross-file import resolution.

LanguageSymbol ExtractionCross-File ResolutionType-Aware Resolution
Astro
Bash
C
COBOL
C++
C#
Dart
Elixir
Fortran
Go
Groovy
HCL
Java
JavaScript
Julia
Kotlin
Lua
Objective-C
Pascal
PHP
PowerShell
Python
Ruby
Rust
Scala
SQL
Svelte
Swift
SystemVerilog
TypeScript
Vue
Zig

Symbol Extraction — functions, classes, methods, types, constants, and module declarations are parsed from source and stored as graph nodes.

Cross-File Resolution — import/export statements are followed to connect symbols across files. NestWeaver resolves monorepo workspace packages and tsconfig path aliases automatically.

Type-Aware Resolution — AST-extracted type bindings (annotations, constructors, self/this, return types) let NestWeaver resolve obj.method() calls to the correct class, even through inheritance chains (MRO walk, depth 5, cycle-safe).

NestWeaver parses 12 package manifest formats to discover project dependencies, entry points, and monorepo workspace boundaries:

ManifestEcosystem
package.jsonJavaScript / TypeScript (npm, yarn, pnpm workspaces)
go.modGo
Cargo.tomlRust (workspace members)
pyproject.tomlPython
requirements.txtPython
composer.jsonPHP
GemfileRuby
pubspec.yamlDart / Flutter
Package.swiftSwift
*.csprojC# / .NET
build.gradle.ktsKotlin / Java (Gradle)
CMakeLists.txtC / C++ (CMake)

Manifest data feeds into dead code detection (identifying entry points) and cross-file resolution (workspace package boundaries).

NestWeaver tracks six edge types between symbols, each with a default weight used by Personalized PageRank:

Edge TypeWeightDescription
CALLS1.0Function/method invocations, JSX component use
EXTENDS/IMPLEMENTS0.9Class inheritance, interface implementation
IMPORTS0.7Import/require/use statements
USES0.5Type references, variable access
ACCESSES0.4Field and property access
MEMBER_OF/INCLUDES0.2Module membership, file includes

Each edge also carries a confidence score (0.0–1.0) based on resolution quality. The --intent flag on nestweaver context adjusts per-edge-type weights to surface the most relevant symbols for your task.

Language grammars are defined as Tree-sitter query files in the queries/ directory. Each language needs:

  1. <lang>.scm — symbol extraction and call/import patterns (required)
  2. <lang>_types.scm — type binding patterns for type-aware resolution (optional)

After adding query files, rebuild NestWeaver and re-index your repository:

Terminal window
cargo build --release
nestweaver index --repo .

Languages without a _types.scm file still get full symbol extraction and cross-file resolution. The types file adds the ability to resolve method calls through type bindings and class hierarchies.