Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add editorconfig support in Razor #4406

Open
allisonchou opened this issue Sep 20, 2021 · 14 comments
Open

Add editorconfig support in Razor #4406

allisonchou opened this issue Sep 20, 2021 · 14 comments
Labels
external Scope involves an area outside of the repo feature request Large improvement request
Milestone

Comments

@allisonchou
Copy link
Contributor

allisonchou commented Sep 20, 2021

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:

  1. Support for indent_size, indent_style etc. generic formatting properties, as per the original linked issue above
  2. Support for start C# editor config controls in document formatting, eg code style
  3. Support for razor specific editorconfig controls for formatting and other behaviours
@allisonchou allisonchou self-assigned this Sep 20, 2021
@allisonchou
Copy link
Contributor Author

allisonchou commented Sep 23, 2021

@allisonchou allisonchou transferred this issue from dotnet/aspnetcore Oct 1, 2021
@allisonchou allisonchou added this to the 17.1 Candidates milestone Oct 1, 2021
@allisonchou allisonchou added external Scope involves an area outside of the repo feature request Large improvement request labels Oct 1, 2021
@y2kbugger
Copy link

It's not even just editorconfig, but also just normal C# naming style settings

@seangwright
Copy link
Contributor

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)

@AllenD-MSFT
Copy link

This also related to https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1408493 (possibly a duplicate issue).

@davidwengier davidwengier modified the milestones: Next Release Candidates, Backlog Oct 4, 2022
@allisonchou
Copy link
Contributor Author

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)

@Kebechet
Copy link

Any update for the .editorconfig support ?

@kuhnboy
Copy link

kuhnboy commented Oct 18, 2023

Any update on .editorconfig support?

@davidwengier
Copy link
Contributor

davidwengier commented Oct 19, 2023

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 😛)

@KennethHoff
Copy link

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)

@epsitec
Copy link

epsitec commented Jun 25, 2024

Any chance of getting this sorted out in the .NET 9 timeframe?

@davidwengier
Copy link
Contributor

@gpshonik
Copy link

gpshonik commented Oct 12, 2024

Adding one more issue for reference: https://developercommunity.visualstudio.com/t/OptionsText-EditorCTab-setting/10377123

The tab size and indent size cannot be individually set in visual studio options - the Razor (ASP.NET Core) tab settings override to the C# tab settings - so that's also not a workaround for missing .editorconfig support in Razor.

@davidwengier
Copy link
Contributor

@gpshonik that bug was actually fixed in #6166 in v17.12 Preview 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external Scope involves an area outside of the repo feature request Large improvement request
Projects
None yet
Development

No branches or pull requests

10 participants