-
Notifications
You must be signed in to change notification settings - Fork 62
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
Bug: alignColons formatting setting affects semicolon on first line #134
Comments
You have set "alignSemicolons" to hanging as well. This is probably why you got this result. |
Do you agree with these statements:
|
My goal is setup the extension to do ANTLR formatting along the lines of common examples provided in TDAR and many examples in the ANTLR4 grammars repo. This means:
I don't think this is currently possible given the current setting options, which is why I filed this as a bug. |
I haven't thought about other occurences than rules, so I cannot answer with yes currently. However, I have not seen output where the semicolon from the introducer line is placed on the next line and I have tests with all 3 semicolon settings. But maybe I just missed that. |
I agree. The setting should not affect non-rules.
If that's the case then it should be fixed. Interesting here is that I never got a bug report for this issue, which either means people don't care about it or they never use hanging semicolons. I certainly do not. |
…t line Signed-off-by: Mike Lischke <mike@lischke-online.de>
The
alignColons
setting, as I understand it, should only impact colons (:
). However, I've noticed that it changes the formatting of semicolons (;
) on the first line in both my parser grammar and lexer grammar.For example, here is the result of formatting:
lexer grammar FooLexer ;
Just in case there might be some kind of interactions between settings, here are my settings:
The text was updated successfully, but these errors were encountered: