ReSharper 2023.3 Help

EditorConfig properties for ShaderLab: ShaderLab Formatting Style

Tabs and indents

Indent style

Property names:

indent_style, [resharper_]shaderlab_indent_style

Possible values:

  • tab: Tab

  • space: Spaces

Examples:

tab

something @section scripts { sdsds } something

space

something @section scripts { sdsds } something

Indent size

Property names:

indent_size, [resharper_]shaderlab_indent_size

Possible values:

an integer

Examples:

value: 0

something @section scripts { sdsds } something

value: 1

something @section scripts { sdsds } something

value: 2

something @section scripts { sdsds } something

Tab width

Property names:

tab_width, [resharper_]shaderlab_tab_width

Possible values:

an integer

Examples:

value: 0

something @section scripts { sdsds } something

value: 1

something @section scripts { sdsds } something

value: 2

something @section scripts { sdsds } something

How to align when tabs are used for indents

Property names:

[resharper_]shaderlab_alignment_tab_fill_style, [resharper_]alignment_tab_fill_style

Possible values:

  • use_spaces: Use spaces (looks aligned on any tab size)

  • use_tabs_only: Only use tabs (inaccurate)

  • optimal_fill: Mix tabs and spaces for optimal fill

Align even if the resulting indentation is too large

Property names:

[resharper_]shaderlab_allow_far_alignment, [resharper_]allow_far_alignment

Allow alignment even if construct is located too far to the right, more than 2/3 of `Hard wrap at` limit

Possible values:

true | false

Brace rules

Brace style

Property names:

[resharper_]shaderlab_brace_style, [resharper_]shaderlab_brace_style, [resharper_]brace_style, [resharper_]brace_style

Possible values:

  • end_of_line: At the end of line (K&R style)

  • end_of_line_no_space: At the end of line (no space)

  • next_line: At next line (BSD style)

  • next_line_shifted: At next line indented (Whitesmiths style)

  • next_line_shifted_2: At next line indented 2 (GNU style)

Examples:

end_of_line

Shader "Unlit/NewUnlitShader" { Properties { _MainTex ("Texture", 2D) = "white" {} } SubShader { Tags { "RenderType"="Opaque" } LOD 100 Pass {} } }

end_of_line_no_space

Shader "Unlit/NewUnlitShader"{ Properties{ _MainTex ("Texture", 2D) = "white" {} } SubShader{ Tags{ "RenderType"="Opaque" } LOD 100 Pass{} } }

next_line

Shader "Unlit/NewUnlitShader" { Properties { _MainTex ("Texture", 2D) = "white" {} } SubShader { Tags { "RenderType"="Opaque" } LOD 100 Pass {} } }

next_line_shifted

Shader "Unlit/NewUnlitShader" { Properties { _MainTex ("Texture", 2D) = "white" {} } SubShader { Tags { "RenderType"="Opaque" } LOD 100 Pass {} } }

next_line_shifted_2

Shader "Unlit/NewUnlitShader" { Properties { _MainTex ("Texture", 2D) = "white" {} } SubShader { Tags { "RenderType"="Opaque" } LOD 100 Pass {} } }
Last modified: 30 November 2023