roslyn: An option controlling the indentation of code within a #region block should be provided.

Currently code within a #region block gets formatted as follows:

public class ExampleClass
{
    #region Methods
    public void ExampleMethod()
    {
    }
    #endregion
}

An option should be provided so that code within a #region block can be indented by one level by default. Doing so would cause the above code to become:

public class ExampleClass
{
    #region Methods
        public void ExampleMethod()
        {
        }
    #endregion
}

About this issue

  • Original URL
  • State: open
  • Created 8 years ago
  • Reactions: 5
  • Comments: 26 (12 by maintainers)

Most upvoted comments

I look forward to see this implemented! I’m impressed it isn’t here yet

I’m going to reopen this as Blocked on #31691 so the feature request is included in the consideration for the extensibility design.

@MarqueIV You’ll likely be able to write your own formatter rule for this as part of https://github.com/dotnet/roslyn/issues/31691

Oh… and for the record, I would happily pay additional money for this feature as it would save all the time I have to undo you messing up my regions! The time alone would easily cover the cost.

Go on… 😃

Feedback definitely noted 😃