feat(repo-map): zig support (#663)

* feature: zig support for repo map

* Update crates/avante-repo-map/Cargo.toml

Co-authored-by: yetone <yetoneful@gmail.com>

* fix: update lint error

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>

---------

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
Co-authored-by: Aaron Pham <Aaronpham0103@gmail.com>
Co-authored-by: yetone <yetoneful@gmail.com>
Co-authored-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
Boy Maas
2024-09-29 19:27:10 +02:00
committed by GitHub
parent d28fece472
commit bac46cee83
4 changed files with 288 additions and 7 deletions

View File

@@ -0,0 +1,23 @@
;; Capture functions, structs, methods, variable definitions, and unions in Zig
(variable_declaration (identifier)
(struct_declaration
(container_field) @class_variable))
(variable_declaration (identifier)
(struct_declaration
(function_declaration
name: (identifier) @method)))
(variable_declaration (identifier)
(enum_declaration
(container_field
type: (identifier) @enum_item)))
(variable_declaration (identifier)
(union_declaration
(container_field
name: (identifier) @union_item)))
(source_file (function_declaration) @function)
(source_file (variable_declaration (identifier) @variable))