daniel-trinh/scalariform

Don't reformat comments switch

LPTK opened this issue · 1 comments

LPTK commented

When using IntelliJ, I often select a few lines and comment them, which places // in the beginning of the line.
This has several advantages. I want to be able to uncomment it later and have it working, but scalaiform messes it up:

  • it idents the comments so the indentation of the uncommented code is now wrong

  • more importantly, it removes inner comments so that comments in the uncommented code become uncommented!!

    {
        blah(0);
    //    blah(1);
    //    // FIXME make this test pass
    //    blah(2);
    }
    

Becomes:

    {
        blah(0);
        // blah();
        // FIXME make this test pass
        // blah();
    }

I'd really appreciate to have a preference switch to prevent comments from being refactored.
I am currently forced to use scalaiform in a project, and this is a productivity killer...

PS: using /* */ comments instead is too tedious and not an option.

This issue was moved to scala-ide#177