zig-mode
zig-mode copied to clipboard
Auto indentation fails on K&R style curly braces
When trying to write:
const std = @import("std");
pub fn main() void
{
std.debug.warn("hello");
}
The auto indenter turns it into:
const std = @import("std");
pub fn main() void
{
std.debug.warn("hello");
}
did you ever find a solution to this?
similarly to go, zig and most things surrounding it sadly don't really support much outside of the de-facto zig style, which puts the opening brackets on the same line as the function definition
though i would also prefer to just be able to use allman/bsd style indentation, in this case id recommend just installing the highlight-indent-guides mode, it helps the readability a decent amount without conflicting with the typical style