codex-lens: add Swift (.swift) indexing support

This commit is contained in:
catlog22
2026-03-05 14:28:13 +08:00
parent ed02874a99
commit dc1dc87023
3 changed files with 11 additions and 0 deletions

View File

@@ -216,6 +216,7 @@ def _detect_language(file_path: Path) -> str:
".go": "go",
".rs": "rust",
".java": "java",
".swift": "swift",
".c": "c",
".cpp": "cpp",
".h": "c",

View File

@@ -80,6 +80,7 @@ class Config:
"go": {"extensions": [".go"], "tree_sitter_language": "go", "category": "code"},
"zig": {"extensions": [".zig"], "tree_sitter_language": "zig", "category": "code"},
"objective-c": {"extensions": [".m", ".mm"], "tree_sitter_language": "objc", "category": "code"},
"swift": {"extensions": [".swift"], "tree_sitter_language": "swift", "category": "code"},
"c": {"extensions": [".c", ".h"], "tree_sitter_language": "c", "category": "code"},
"cpp": {"extensions": [".cc", ".cpp", ".hpp", ".cxx"], "tree_sitter_language": "cpp", "category": "code"},
"rust": {"extensions": [".rs"], "tree_sitter_language": "rust", "category": "code"},