You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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:
@matu3ba I think the issue is limited to if expressions. (An ifstatement would always start on its own line.) For example, this is a valid Zig program:
Ah, now I do understand the problem.
I think a proper solution requires a parser to distinguish expressions from statements, since those can be arbitrarily nested.
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: