razor icon indicating copy to clipboard operation
razor copied to clipboard

Allow customization of Blazor Razor component formatting rules

Open vsfeedback opened this issue 3 years ago • 1 comments

This issue has been moved from a ticket on Developer Community.


Hello, I'd like to be able to customize some formatting rules in my Blazor Razor component files. Mainly the element attribute indentation rules.

The default formatting rule is to place the first attribute on the same line as the element start tag, and following attributes keep the indentation of the initial attribute.

<SfTextBox CssClass="e-field"
           Placeholder="Tag" />

I would like to customize the formatting rule so that the first attribute will be on the line below the element start tag, with a single indentation from the element start tag and have the following attributes to use the same indentation.

<SfTextBox 
    CssClass="e-field"
    Placeholder="Tag" />

vsfeedback avatar Jun 30 '22 22:06 vsfeedback

Blocked on https://github.com/dotnet/razor-tooling/issues/6212

allisonchou avatar Jul 07 '22 22:07 allisonchou