Decrease indent on the next line


#1

I have written my first package language-tutch.

The indentation pattern is pretty simple but I can’t get it right.

You increase indent when opening a bracket [ and decrease it with the closing bracket ].
Usually the closing bracket is on another line.

But I would like the decrease to take effect on the next line, so that the line with the closing bracket is still indented.

This is what I have in my grammar file.

'increaseIndentPattern': '(?x) \\[ [^\\]]* $'
'decreaseIndentPattern': '(?x) ^ [^\\[]* \\]'

and it results in this

[A & B;
B;];  
(A & B) => B;

I would like to get this

[A & B;
 B;];
(A & B) => B;

Thank you