Perl5-IDEA icon indicating copy to clipboard operation
Perl5-IDEA copied to clipboard

Indentation is wrong for LABEL:'s inside a block

Open akarelas opened this issue 5 years ago • 7 comments

IDE: WebStorm 2020.2.3 #WS-202.7660.23 Perl5 plugin: 2020.2.4 OS: Ubuntu MATE 20.04

When I type this:

{
    FOO: {

and press Enter, I get this, that has very wrong indentation:

{
    FOO: {
    |                        # cursor is at: |
}
}

...and the cursor is right underneath F (of FOO).

akarelas avatar Nov 09 '20 12:11 akarelas

Looks like there is a bug in the formatting engine in IDEA. Investigating. As temporary workaround you may add a newline between label and block.

hurricup avatar Nov 27 '20 05:11 hurricup

Maybe the maintainers of this plugin could tell IDEA devs about this bug.

akarelas avatar Nov 09 '21 16:11 akarelas

I did. But it's complicated.... Looks like perl formatter has some bug, which usually works as expected because of other bug in platform. But this case fails :)

hurricup avatar Nov 09 '21 16:11 hurricup

So is it a matter of finding this Camelcade bug? Or does the other bug in IDEA need to be found and solved too?

akarelas avatar Nov 09 '21 17:11 akarelas

yes. basically first perl formatter should be refactored to work properly

hurricup avatar Nov 09 '21 17:11 hurricup

If someone wanted to help you in debugging this, would they need to know Java?

akarelas avatar Nov 21 '21 04:11 akarelas

Yes and it's just for start. There is no need to debug actually, it requires a time to work I don't currently have.

hurricup avatar Nov 21 '21 05:11 hurricup