Skip to content

Commit c8edaba

Browse files
committed
feat: add Zig language support with SCIP indexing
Merge PR #27 from jedisct1 to add comprehensive Zig language support: Core Changes: - Add ZigStrategy with complete SCIP-compliant indexing (738 lines) - Support both Tree-sitter and regex parsing approaches - Register Zig strategy in SCIPIndexerFactory with priority 95 - Add .zig and .zon file extension support in constants - Update README.md to document Zig language support Test Coverage: - Add complete Zig test project in test/sample-projects/zig/ - Include build.zig, main.zig, root.zig examples - Cover major Zig language constructs (functions, structs, enums, tests) Architecture Consistency: - Maintain clean SCIP strategy architecture - Remove redundant analyzers system components during merge - Keep focus on unified SCIP-based indexing approach This implementation provides full Zig language support following the same high-quality SCIP standards as other supported languages.
2 parents fc58b18 + ffdf969 commit c8edaba

File tree

9 files changed

+1239
-211
lines changed

9 files changed

+1239
-211
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ The easiest way to get started with any MCP-compatible application:
9494
**System & Low-Level:**
9595
- C/C++ (`.c`, `.cpp`, `.h`, `.hpp`)
9696
- Rust (`.rs`)
97-
- Zig (`.zig`)
97+
- Zig (`.zig`, `.zon`)
9898
- Go (`.go`)
9999

100100
**Object-Oriented:**

src/code_index_mcp/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
'.fs', '.fsx', # F#
4242
'.clj', '.cljs', # Clojure
4343
'.vim', # Vim script
44-
'.zig', # Zig
44+
'.zig', '.zon', # Zig
4545

4646
# Web and markup
4747
'.html', '.htm', # HTML

src/code_index_mcp/scip/factory.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from .strategies.javascript_strategy import JavaScriptStrategy
88
from .strategies.java_strategy import JavaStrategy
99
from .strategies.objective_c_strategy import ObjectiveCStrategy
10+
from .strategies.zig_strategy import ZigStrategy
1011
from .strategies.fallback_strategy import FallbackStrategy
1112
from ..constants import SUPPORTED_EXTENSIONS
1213

@@ -34,6 +35,7 @@ def _register_all_strategies(self):
3435
JavaScriptStrategy(priority=95),
3536
JavaStrategy(priority=95),
3637
ObjectiveCStrategy(priority=95),
38+
ZigStrategy(priority=95),
3739
]
3840

3941
for strategy in language_strategies:
@@ -117,6 +119,8 @@ def list_supported_extensions(self) -> Set[str]:
117119
supported.update({'.java'})
118120
elif isinstance(strategy, ObjectiveCStrategy):
119121
supported.update({'.m', '.mm'})
122+
elif isinstance(strategy, ZigStrategy):
123+
supported.update({'.zig', '.zon'})
120124
elif isinstance(strategy, FallbackStrategy):
121125
# Fallback supports everything, but we don't want to list everything here
122126
pass

0 commit comments

Comments
 (0)