Two practical tips for using zig fmt effectively. The formatter is 'steerable' — it selects layout variations based on what's already in the file, such as using trailing commas to toggle between single-line and multi-argument-per-line function calls. A non-trivial customization point is columnar array layout: zig fmt respects the first line break position to determine how many items appear per line, and using the ++ operator allows further control over items-per-line grouping.
Sort: