Indentation after pressing enter
Answered
I have a formatting issue with my custom language plugin that i'm not sure how to resolve.
After formatting the file, if I click between the braces it shows the caret at the correct location:
However, if i place my caret on the top brace and press enter, the caret doesn't indent properly
I'm guessing this is something to do with the Alignment setting, i've tried creating a new alignment for all of the children of the statement block, but this doesn't seem to affect the caret.
Does anyone have any suggestions on how to investigate/fix this?
Please sign in to leave a comment.
The solution was to implement getChildAttributes like so:
Hi Thomas,
Thank you for sharing this simple yet useful implementation for handling enter key indentation.
😊
This method is from which class? Also do I need to add any extension point for this?