Generate tags files for Zig projects.
ctags, this does not use regular expressions, but instead analyzes the
abstract syntax tree of the source code.
Simply clone this repository and build with
zig build. This will produce a
Debug build by default, which generates useful error messages but can be a
bit slow. To build a release build use
$ zig build -Doptimize=ReleaseSafe
To build the man page (requires scdoc), run
$ zig build docs
This will install the man page to
share/man/man1/ztags.1 relative to the
prefix given with
To build and install both
ztags and the man page to
$ zig build -Doptimize=ReleaseSafe -p $PREFIX install docs
master branch tracks Zig
HEAD. Use the
0.11.0 branch if using a
Pass a source file to the
ztags will find
statements for relative files (i.e. any imports that end with
recursively index those files too.
Packages (imports that are not a relative path, but a package name such as
@import("foo")) are not followed, as package information is not available at
runtime. Instead, pass the root source file of each package as an additional
command line argument.
For example, the entire Zig standard library can be indexed using:
$ ztags /path/to/zig/std/std.zig
The following "kinds" are supported:
Have a question, comment, or feature request? Send an email to the mailing list.