Here is my desired output

class MyClass {
    private string $myVar; // note about myVar
    private string $myOtherVar; // not about myOtherVar
 }

But what I get after I format is this.

class MyClass {
    private string $myVar; 
    // note about myVar
    private string $myOtherVar; 
    // not about myOtherVar
 }

I have read over all the spacing and newline options and LOOOOOOVE it all give or take a few little headaches like this.

Am I missing something very simple?

    JimNayzium Thank you for the question!

    I have tried your sample, and with the default settings, it's not moving my comments. So I guess there is some changed option that causes it. What are your settings?

      10 days later

      @JimNayzium with the default settings, the code is formatted all alright. May I ask what settings you have changed?

        Write a Reply...