Search code examples
rider

Jetbrains Rider, how to disable text indenting within documentation comments (summary tags)?


In Jetbrains Rider 2021.3x, after executing Code Clean Up, text in documentation comments are being indented. How can this be disabled? In the example below, rider inserts the text indents in the summary tag, want to prevent this:

   /// <summary>
   ///    Why does Rider indent these comments? How can it be disabled?
   ///    Any idea of what settings!?
   /// </summary>
   public class Person{}
      

After Code Cleanup execution, the text should have no indents, like below:

   /// <summary>
   /// Why does Rider indent these comments? How can it be disabled?
   /// Any idea of what settings!?
   /// </summary>
   public class Person{}

Just struggling to find the correct settings...


Solution

  • Go to File | Settings | Editor | Code Style | C# and open the tab XML documentation. There you should find the setting Indent inside element that contain text which you can set to No indent from parent element: enter image description here