Hello,
I’ve started working on a Blazor Hybrid project and am encountering inconsistent formatting in .razor files. I’m the only one on macOS using VS Code, while the rest of my team uses Visual Studio on Windows. I’d like to match their formatting style, but I can’t figure out how to configure it.
Problem
Here's an example:
Expected formatting:
<div class="some-class">
<Something Data="@Values"
ValueField="Value"
TextField="Label"
Value="@SelectedValue"
ValueChanged="@((int value) => OnValueChanged(value))"
ValueExpression="@(() => SelectedValue)"
/>
</div>
Actual formatting (VS Code on macOS):
<div class="some-class">
<Something Data="@Values" ValueField="Value" TextField="Label" Value="@SelectedValue"
ValueChanged="@((int value) => OnValueChanged(value))" ValueExpression="@(() => SelectedValue)"
/>
</div>
My Setup
- macOS
- Visual Studio Code
- Installed extensions:
- C# Dev Kit (pre-release)
- .NET MAUI
Questions
- Is Razor formatting in VS Code configurable to match the style of my colleagues?
- Is there a config file or setting I’m missing?
- Is this a limitation or a bug in the Razor Language Server for VS Code?
Thanks in advance!
Hello,
I’ve started working on a Blazor Hybrid project and am encountering inconsistent formatting in
.razorfiles. I’m the only one on macOS using VS Code, while the rest of my team uses Visual Studio on Windows. I’d like to match their formatting style, but I can’t figure out how to configure it.Problem
Here's an example:
Expected formatting:
Actual formatting (VS Code on macOS):
My Setup
Questions
Thanks in advance!