Problem
When editing a Razor file in the JetBrains Rider IDE, pressing the Enter key automatically reformats the code on the current or subsequent line. This behavior can interfere with deliberate manual formatting.
Cause
This functionality is controlled by the Auto-format on Enter setting within Rider's Typing Assistance options for Razor. This feature is enabled by default and is designed to help maintain a consistent code style, but it can be disabled if it disrupts your workflow.
Resolution
To disable automatic formatting when pressing the Enter key in Razor files, follow these steps:
- Open the Settings dialog in Rider (File→Settings)
- Navigate to Editor → General → Typing Assistance
- Under the Razor section, find the Auto-format on Enter option
- Clear the checkbox next to Auto-format on Enter
Comments
0 comments
Please sign in to leave a comment.