From 26d35c355b9e3558ffffcef2e45324b53e915cb5 Mon Sep 17 00:00:00 2001 From: Ivar Fatland Date: Thu, 15 Oct 2026 18:18:45 +0200 Subject: [PATCH] add zig ctags regexes --- ctags/.config/ctags/zig.ctags | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 ctags/.config/ctags/zig.ctags diff --git a/ctags/.config/ctags/zig.ctags b/ctags/.config/ctags/zig.ctags new file mode 100644 index 0000000..cbcb1e7 --- /dev/null +++ b/ctags/.config/ctags/zig.ctags @@ -0,0 +1,13 @@ +--langdef=zig +--map-zig=.zig + +--kinddef-zig=f,function,functions +--kinddef-zig=m,method,methods +--kinddef-zig=t,type,types +--kinddef-zig=v,field,fields + +--regex-zig=/^(export +)?(pub +)?(inline +)?fn +([a-zA-Z0-9_]+)/\4/f/{exclusive} +--regex-zig=/^(export +)?(pub +)?[\t ]*const +([a-zA-Z0-9_]+) = (struct|enum|union)/\3/t/{exclusive}{scope=push} +--regex-zig=/^}///{exclusive}{scope=pop}{placeholder} +--regex-zig=/^[\t ]+(pub +)?(inline +)?fn +([a-zA-Z0-9_]+)/\3/m/{exclusive}{scope=ref} +--regex-zig=/^(export +)?pub +const +([a-zA-Z0-9_]+)(:.*)? = .*/\2/v/{exclusive}