-
Notifications
You must be signed in to change notification settings - Fork 59
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
"Lone" else lines are not properly indented #73
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
Is it fair to say that a lone |
@matu3ba I think the issue is limited to pub fn main() u8 {
const retval = if (true)
0
else
1;
return retval;
} |
Ah, now I do understand the problem. I can tell you that nvim-treesitter indent is broken for Zig and helix has also not implemented indentation based on treesitter yet. |
By "lone" else lines, I mean lines in if statements that only have whitespace and the
else
keyword. They're usually around when there is a multi-line if condition that isn't directly made up of blocks.For an actual example on what is happening - I typed this code from top to bottom using automatic indentation:
What I expect to happen is the following:
NOTE: I was previously working on this under the #59 PR, but got stuck and don't really know where to go anymore, so I'm leaving it up for anyone who may be able to tackle this in a better way.
The text was updated successfully, but these errors were encountered: