nn-noname/zfmt
This is a mirror - main development: https://gitlab.com/nn-noname/zfmt - this mirror isn't automated, I push to it every now and then
Zfmt uses zig 0.15.1, and its formatter is based off of zig fmt version 0.15.1
Zfmt will be usable with all modern zig versions.
indentation amount
inlined assembly indentation amount
brace style
available options:
fn main() void {
// hello world
}
fn main() void
{
// hello world
}
Note that allman style can break pre-existing code.
true: 1 + 2
false: 1+2
I made this formatter in less than a day (12 hours or so)
so there is probably some issues, if you encounter any then make an issue or a pull request.
Please, get these discussions out of this git repo, I fundamentally disagree with that idea.
Tool inflexibility often breaks off ecosystems more than unify together, zfmt is a prime example of that.
I myself before making zfmt forked the entire zig compiler just to get 8 space indentation
I think that the fact zig is so opinionated is its biggest flaw.
If you disagree, then just use the opinionated zig fmt.