From 36234afb5ca3b3b99d3915a93364152913d32768 Mon Sep 17 00:00:00 2001 From: Scavenger Date: Thu, 12 Mar 2026 20:25:42 +0100 Subject: [PATCH] feat: add Lua language support Add .lua files to DEFAULT_INCLUDED_PATTERNS to enable automatic indexing of Lua code. The underlying cocoindex library already supports Lua language detection, this change makes it available by default without requiring COCOINDEX_CODE_EXTRA_EXTENSIONS. Changes: - Add **/*.lua to DEFAULT_INCLUDED_PATTERNS in indexer.py - Add Lua to supported languages table in README.md --- README.md | 1 + src/cocoindex_code/indexer.py | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 69fa865..57f375f 100644 --- a/README.md +++ b/README.md @@ -320,6 +320,7 @@ Returns matching code chunks with: | javascript | js | `.js` | | json | | `.json` | | kotlin | | `.kt`, `.kts` | +| lua | | `.lua` | | markdown | md | `.md`, `.mdx` | | pascal | pas, dpr, delphi | `.pas`, `.dpr` | | php | | `.php` | diff --git a/src/cocoindex_code/indexer.py b/src/cocoindex_code/indexer.py index 37b1f7f..1f93792 100644 --- a/src/cocoindex_code/indexer.py +++ b/src/cocoindex_code/indexer.py @@ -42,6 +42,7 @@ "**/*.txt", # Plain text "**/*.rst", # reStructuredText "**/*.php", # PHP + "**/*.lua", # Lua ] INCLUDED_PATTERNS = DEFAULT_INCLUDED_PATTERNS + [f"**/*{ext}" for ext in config.extra_extensions]