Subject: | opening token stacking strange behavior |
Original:
my $x = [
{
foo => 1,
bar => 1,
},
{
bat => 1,
baz => 1,
},
];
After tidy:
my $x = [{
foo => 1,
bar => 1,
},
{
bat => 1,
baz => 1,
},
];
Tidy Config:
--indent-columns=4 # size of indentation
--tabs # use tabs
--entab-leading-whitespace=4 # 4 spaces to a tab when converting to tabs
--continuation-indentation=4 # indentation of wrapped lines
--maximum-line-length=0 # max line length before wrapping (turn it off)
--nooutdent-long-quotes # do not outdent overly long quotes
--paren-tightness=2 # no spacing for parentheses
--square-bracket-tightness=2 # no spacing for square brackets
--brace-tightness=2 # no spacing for hash curly braces
--block-brace-tightness=0 # spacing for coderef curly braces
--comma-arrow-breakpoints=1 # break long key/value pair lists
--break-at-old-comma-breakpoints # this attempts to retain list break points
--no-blanks-before-comments # do not insert blank lines before comments
--indent-spaced-block-comments # no blanks before comments
--cuddled-else # } else { appears all on one line
--nospace-for-semicolon # no space before semicolons in loops
--nospace-terminal-semicolon # no space before termonal semicolons
--notrim-qw # don't trim lead/trail whitespace around multi-line qw
--blank-lines-before-subs=2 # 2 lines before each sub
--opening-token-right # make "push @array, {" indent nicely
--stack-opening-tokens # Stack opening tokens: "{ {" instead of "{\n\t{"
--stack-closing-tokens # Stack closing tokens: "} }" instead of "\t}\n}"
--converge # Run until the output stops changing
--extended-syntax # For Fennec/Test2 and other Devel::Declare syntax tools
--blank-lines-before-packages=0 # Do not force a newline before a 'package' declaration
I want it to stack opening and closing tokens when there is only one nested item, but not when there are more than one:
# This is what I want when there is only one nested item
my $x = [{
foo => 1,
bar => 1,
}];
Is there an option I am missing, or can tweak to fix this?