Indentation after pressing enter in Custom Language in Intellij

已回答

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: ('|' is cursor in below code snippet)

attach Value {
  |         
}

 

C detected

However, if i place my caret on the top brace and press enter, the caret doesn't indent properly

attach Value {
|         
}

 

C detected

Does anyone have any suggestions on how to investigate/fix this?

0

Hej there,

the PSI Viewer can show you the block structure that was built for formatting. That should at least help you investigate the problem.

0

Hi,

You most likely have to implement getChildAttributes() in your Block.

0

请先登录再写评论。