AiDex icon indicating copy to clipboard operation
AiDex copied to clipboard

feat: add .astro file support

Open zlegein opened this issue 6 months ago • 0 comments

Index Astro files by parsing their TypeScript frontmatter (content between --- fences) using the TSX grammar. Line numbers are preserved by replacing template lines with blank lines before parsing, so all reported positions match the original file.

Changes:

  • parser/tree-sitter.ts: add 'astro' to SupportedLanguage, EXTENSION_MAP, and GRAMMAR_MAP (uses TypeScript.tsx); add extractAstroFrontmatter(); update parseFile() to extract frontmatter before parsing .astro files
  • parser/languages/index.ts: add 'astro' config (reuses TypeScript config)
  • commands/init.ts: add '.astro' to CODE_EXTENSIONS

zlegein avatar May 20 '26 00:05 zlegein