How to prevent Rider from outdenting my comments

This is my current setting.


After reformatting I get this:


But I would prefer this:

I have tried both selecting and de-selecting the, “Don't indent comments started at first column” but this seems to have no effect.

Any suggestions? I find this hard to read when the comments break the scope. Thanks.


Hello Proofpix,

I tried to reproduce the case in my lab, but it works correctly. Such behavior might happen due to some settings.

Please attach Rider settings: File | Manage IDE Settings | Export Settings. I will try to reproduce the behavior once again with your settings, and hopefully, we can pin down the root cause of the issue.

Thank you in advance!


Hello Proofpix,

In your setting I can see the Don't indent comments started at first column and Place comments at first column when commenting out code are disabled.
With your settings the comments are indented with current context when formatting codes.

It's working as expected from my side, so I may need to check further on your Rider-backend settings. 
In Settings dialog you will see Manage Layers button in the bottom left corner. You can export the three layers settings here. Or you can try further with reset the settings to see if it will be helpful.


Please sign in to leave a comment.