Formatting indents make me go nuts

Answered

I'm using a custom Block model that implements ASTBlock. All Comment blocks return Indent.getNormalIndent() as the result of getIndent().

But they get Indented in very strange manner see attached picture. What am I missing again and again?

Indent settings are: INDENT_SIZE=4, CONTINUATION=20

 
 

 

 

0
1 comment

The formatter controls spacing including indentation only between adjacent leaf blocks. That's why the first leaf block will never get indentation. As a workaround you can handle it in a PostFormatProcessor which will forcibly add a needed indentation in the beginning.

0

Please sign in to leave a comment.