#Configuring zig fmt
1 messages · Page 1 of 1 (latest)
zig fmt has no configuration options, by design.
However, if you have a complex piece of code that is very hard to read after formatting, like large multidemensional arrays, you can use the comments // zig fmt: off and // zig fmt: on around the block. I'd use it sparingly of course
Thanks. Are there alternative formatting libs for zig?
Not to my knowledge, and I certainly wouldn't recommend it anyway. Many of Zig's choices are guided by prioritizing the reading of code, and universally-consistent formatting rules are in support of that value