language-support
SolidAdding tree-sitter language coverage
AI & Automation 98 stars
21 forks Updated yesterday MIT
Install
Quality Score: 82/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Language Support
Use this to add a new language to basemind's extraction. Supported languages today include Rust, Python, TypeScript/JSX, JavaScript, Go.
## Inputs needed
- A tree-sitter grammar crate (e.g. `tree-sitter-elixir`) reachable via the `tree-sitter-language-pack` umbrella crate basemind already depends on, or as a direct dep.
- The grammar's upstream `queries/tags.scm` from the tree-sitter org repo — it's the canonical starting point for symbol + reference extraction.
## Steps
1. **Register the language**
- Add the lang ID + file extensions to `src/lang.rs`'s language registry.
- Add the extensions to the scanner's accepted-extension set in `src/scanner.rs` (or the central glob if one exists).
2. **L1 (outline) queries**
- Adapt the upstream `tags.scm` to basemind's L1 capture shape: `@symbol.function`, `@symbol.method`, `@symbol.class`, etc. mapped to `extract::SymbolKind`.
- Place query string in `src/queries/<lang>.rs` (or under `src/extract/queries/`, matching the existing layout).
- Wire into `extract::l1::extract`'s language dispatch.
3. **L2 (calls) queries**
- Add a call query: callees as `@call.callee` plus optional receiver / type info.
- Wire into `extract::l2::extract`'s dispatch. Remember to populate `start_row` / `start_col` on `Call`.
4. **Fixtures + smoke test**
- Add a synthetic file under `tests/fixtures/<lang>/` exercising at least: one function def, one method, one call site, one import.
- Add assertions in `...
Details
- Author
- Goldziher
- Repository
- Goldziher/basemind
- Created
- 2 years ago
- Last Updated
- yesterday
- Language
- Rust
- License
- MIT
Integrates with
Bundled in these plugins
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Listed
stack-scaler
Step-by-step guide for extending the Eitr codebase to support a new programming language and/or E2E test automation tool. Covers the full pipeline from CLI questionnaire through plan.ts generator registry to template generation and tests.
4 Updated today
ivanestar AI & Automation Listed
add-a-linter
Add a new linter to vigiles's cross-referencing engine as one cohesive, type-enforced unit — a LinterAdapter in the LINTERS registry, with the conformance test enforcing docs + site parity so no site is forgotten
15 Updated today
zernie AI & Automation Listed
star-lang
star-lang, language, schemas, compiler, runtime, extensions, common-lisp
0 Updated yesterday
lost-rob0t