Skip to content

feat: add HCL/Terraform language support#9

Open
mijho wants to merge 1 commit intoglommer:mainfrom
mijho:mijho/sync-upstream-changes
Open

feat: add HCL/Terraform language support#9
mijho wants to merge 1 commit intoglommer:mainfrom
mijho:mijho/sync-upstream-changes

Conversation

@mijho
Copy link
Copy Markdown

@mijho mijho commented Mar 7, 2026

Summary

  • Add HCL/Terraform language support for tree-sitter chunking (.tf, .tfvars, .hcl files)
  • Add rootBodyWrapper config field to LanguageConfig for languages where the root node wraps children in a body node
  • Handle HCL block name extraction (resource.aws_instance.example) and attribute names

Test plan

  • Existing tests pass (bun test — 12 tests, 0 failures)
  • Index a Terraform project and verify chunks are created with correct block/attribute names

🤖 Generated with Claude Code

Add tree-sitter-hcl grammar for parsing .tf, .tfvars, and .hcl files.
Includes block/attribute name extraction and rootBodyWrapper support
for HCL's body node structure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mijho
Copy link
Copy Markdown
Author

mijho commented Mar 7, 2026

Hey @glommer, apologies for this one I'd intended this to be pushed to my fork and open an issue to see if you are interested in additional language support.

Feel free to close if you are not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant