razor
razor copied to clipboard
Add editorconfig support in Razor
Tracking issue on the Razor side for adding editorconfig support in Razor. Will likely need to discuss with Platform since the bulk of the work may need to be done on their side.
See 1) in: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1388770/ for original VSTS issue.
There are a few different aspects to .editorconfig support, with different statuses and priorities:
Current status:
- Support for
indent_size
,indent_style
etc. generic formatting properties, as per the original linked issue above- Blocked by the Visual Studio editor, tracked internally by https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1408493
- Support for start C# editor config controls in document formatting, eg code style
- Not supported, is possible with bigger architectural changes like https://github.com/dotnet/razor/issues/6919
- Support for razor specific editorconfig controls for formatting and other behaviours
- Tracked by https://github.com/dotnet/razor/issues/8413
Tracking issues: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1408466 https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1408465
Other user asks: https://developercommunity.visualstudio.com/t/editorconfig-settings-for-razor-files-/1675953 https://developercommunity.visualstudio.com/t/editorconfig-not-applying-to-cshtml/10044204
It's not even just editorconfig, but also just normal C# naming style settings
Is this related to "Code Cleanup on Save" (https://devblogs.microsoft.com/visualstudio/bringing-code-cleanup-on-save-to-visual-studio-2022-17-1-preview-2/) not working for Razor files?
VS's "Format Document" command formats a Razor file, but saving a Razor file does nothing even with "Code Cleanup on Save" enabled.
(I'm using VS 17.2.0)
This also related to https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1408493 (possibly a duplicate issue).
Currently awaiting work on the Editor side: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1408466/ (Msft internal issue) https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1408493/ (Msft internal issue)
Any update for the .editorconfig support ?
Any update on .editorconfig support?
No updates I'm afraid, we're still blocked on the VS editor fixing internal issue 1408493, which has been linked a few times here. I updated the main description of the issue with the status.
We are hopeful that the editor team will fix this in the next few months, but given how old this issue is, it would be pretty foolish of me to promise that (and of you to believe it 😛)
I'm assuming this will be looked at in conjunction with the compiler rewrite that's underway? (At least the foundations for supporting it so that it can be supported quickly thereafter)
Any chance of getting this sorted out in the .NET 9 timeframe?