-
Notifications
You must be signed in to change notification settings - Fork 33
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
Unexpected auto-indentation for PlusCal c-syntax #120
Comments
You're right, the PlusCal indentation doesn't work as expected with the c-syntax. I need to fix that. |
@dricketts, it's fixed and will be delivered as a part of the v1.3.0 release. BTW, if you put the algorithm closing curly brace and the closing comment parenthesis on the same line ( |
Awesome, thanks. I forgot about putting the closing comment on the same line as the closing curly brace. Thanks for reminding me. |
@dricketts, the auto-indentation should work better with C-syntax in just released v1.3, so I'm closing the issue. Please, feel free to reopen it should the problem remain. |
Indentation sometimes is a bit surprising for PlusCal c-syntax. If an algorithm has a procedure, then the plugin properly indents within the procedure, but also seems to continue to indent after the closing bracket of the procedure. For example, in the following algorithm, going to a new line after the closing bracket of F moves the cursor to the next indentation level.
Glancing at src/formatters/tla.ts, it looks like the block begin and end logic does not look for
{
and}
, but ratherbegin
andend
of the p-syntax.The text was updated successfully, but these errors were encountered: