EditorConfig properties for Razor CSharp: CodeStyle
Last modified: 28 December 2022tip
Formatting preferences listed on this page can be also configured visually, on the Code Editing | Razor CSharp | Formatting Style | CodeStyle page of ReSharper options (Alt+R, O).
Line breaks around Razor statements
Property names:
[resharper_]html_linebreaks_around_razor_statements
, [resharper_]linebreaks_around_razor_statements
Possible values:
true | false
Examples:
true |
---|
|
false |
---|
|
Blank lines around Razor @functions block
Property names:
[resharper_]html_blank_lines_around_razor_functions
, [resharper_]blank_lines_around_razor_functions
Possible values:
an integer
Examples:
value: 0 |
---|
|
value: 1 |
---|
|
value: 2 |
---|
|
Blank lines around Razor helpers
Property names:
[resharper_]html_blank_lines_around_razor_helpers
, [resharper_]blank_lines_around_razor_helpers
Possible values:
an integer
Examples:
value: 0 |
---|
|
value: 1 |
---|
|
value: 2 |
---|
|
Blank lines around Razor sections
Property names:
[resharper_]html_blank_lines_around_razor_sections
, [resharper_]blank_lines_around_razor_sections
Possible values:
an integer
Examples:
value: 0 |
---|
|
value: 1 |
---|
|
value: 2 |
---|
|
Override brace style for C# to always use 'At end of line (K&R style)'
Property names:
[resharper_]razor_always_use_end_of_line_brace_style
, [resharper_]always_use_end_of_line_brace_style
Possible values:
true | false
Remove blank lines after '{' and before '}' in @functions
Property names:
[resharper_]razor_remove_blank_lines_near_braces
, [resharper_]remove_blank_lines_near_braces
Possible values:
true | false
Always remove 'this.' qualifier (override corresponding C# setting)
Property names:
[resharper_]razor_remove_this_qualifier
, [resharper_]remove_this_qualifier
Possible values:
true | false
Use fully qualified names for @inherits and @model directives
Property names:
[resharper_]razor_prefer_qualified_reference
, [resharper_]prefer_qualified_reference
Possible values:
true | false