Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto indentation fails on K&R style curly braces #16

Open
BitPuffin opened this issue Jun 17, 2019 · 2 comments
Open

Auto indentation fails on K&R style curly braces #16

BitPuffin opened this issue Jun 17, 2019 · 2 comments

Comments

@BitPuffin
Copy link

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");
}
@visceralchokehold
Copy link

did you ever find a solution to this?

@averycoolbean
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants