-
Notifications
You must be signed in to change notification settings - Fork 196
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
Formatting #4358
Comments
Looking forward to this! Currently getting |
Yup! |
Really looking forward to this, any date for it? Also should |
@matijagrcic I wouldn't add it to that list because the end-goal is once Razor is functioning 100% it would take over the current "Razor" identifier. For now to avoid breaking everyone on the planet we've made a separate content type identifier ( |
Thanks, makes sense, wasn't sure if that was the case. |
Is there any progress on this feature? |
@enricoreich Sadly this is planned at least 2 releases out. @danroth27 just pinging you because I noticed all the thumbs up/interest on this one 😄 |
Hi, Did you have any progress to share about this issue progress? |
@ponchautf It's definitely one of the most asked for features and it's something we want to accomplish sooner rather than later. That being said we're currently prioritizing other high impact issues such as colorization over this. We're still looking at 2 or so releases out for formatting to land (a few months). |
@ajaybhargavb given we're not going to return to formatting (we got |
Sounds good. We can backlog this until the prerequisites like dotnet/aspnetcore#14286 are handled. |
Any progress on this? On latest version we have no more "There is no formatter" message but nothing is happening! All my views are a mess, this functionality is a must! |
@zmp2000, we currently have support for formatting C# code inside the |
@ajaybhargavb this year? Will this new formatting power the VS also? UPDATE |
Would this also include the ability to customize code style preferences like we currently can with C# in Visual Studio using the options window or .editorconfig file? If not, is there another issue tracking that? |
What type of code styles are you interested in? I'd imagine C#'s code styles are respected today are they not? |
@NTaylorMullen I can think of a few use cases I would use.
I'm sure I could come up with others, but those are some I can think of off the top of my head :) |
Ah I see. So sadly this effort doesn't encompass that 😢 |
please, is there any progress on this? |
I would die for having this. |
Still pretty much the same state but the language server is now available in Visual Studio https://devblogs.microsoft.com/aspnet/new-experimental-razor-editor-for-visual-studio/ |
One more like from me for this feature. Maybe it’s quite annoying for the team but this is the only reason stopping me from using VS Code as a daily driver, as I’m using Razor most of the time. |
@nextfool I totally agree, It's a mess, it gives me a headache every day! Specially with Blazor |
bump |
I don't think we should wait anymore for that. A definitively give up ans switched to JetBrains rider, expensive but not that much regarding the time wasted with Vs code. Visual studio for Mac is free but it's also the worst IDE I used VS code i a great text editor but not more than that. |
Hey folks, thought I'd leave a message here and just let you all know that we're hard at work on making Razor formatting reliable, flexible, and more importantly correct 😆! Please bare with us though, it's an incredibly hard area to get right and we want to make sure we're able to deliver a quality experience for everyone to use. Love all the passion though, please keep leaving your suggestions, insight and ideas! |
lol ya it's been a while. I'd be super curious as to all of your thoughts on Razor formatting in the latest Visual Studio 2022 builds. We've done loadsssss of work in the area! /cc @davidwengier |
If now omnisharp and VS use the same lsp, why don't you update/provide new versions to vscode? |
so glad to see they are doing something on this... |
Since first trying preview 6 (and now using preview 7:) Kinda drives me crazy, lol |
I've noteid a weird behaviour in my solution when dealing with razor components. When the autoformat runs (which I can't seem to stop) on the insertion of a ';' character, it moves the caret to the end of the opening '@code {' line. This is a bit disruptive, particularly in a razor component with over 1000 lines of code. Going into the settings and changing the editor back to the legacy razor editor fixes that, but the code doesn't look anywhere near as pretty. But I may have to do so until the next update lands and I can try this out again. |
I've also managed to repro when I've created a new blazor server app. |
Oh definitely! This is probably one of the most disruptive bugs we currently have. I'm sorry you're running into it :(. If it helps we have a fix queued up for 17.0.3 (hopefully mid Dec) and in 17.1-Preview2. That work was tracked here: https://developercommunity.visualstudio.com/t/In-a-blazor-page-razor-adding-semi-c/1574500 |
It's pretty sad for developers working on dotnet ecosystem not getting most required features in Microsoft own editor 😃 You would suggest Visual Studio convincing that, It supports almost all the things out of the box! |
bump |
Running latest VS Studio 2022 as of 2022/09/08 version 17.3.3. when the html is first and the @Sections are placed below the first @section gets formatted correctly, where any that follow or html that follow bellow those @Sections get messed up indentation. Before updating to 17.3.3 I had 17.1.* and formatting worked fine then (tried inputting example code to show what i mean but the formatting gets messed up when i try paste in here Have a epic day! |
How about adding screenshots instead? |
Thanks for the info @nastro1995, but I'm going to move your comments to a new issue. For anyone reading this, its a lot easier for us to track things if you just create new issues for each specific problem, than trying to keep track of huge threads, and the new issues appear in our triage lists etc. so they won't get lost. Regarding In fact, I'm going to go so far as to say that this issue isn't helping anyone remaining open, and I'm going to close it. If anyone has formatting issues or requests, or indeed any other bug reports or feature requests, please feel free to log new issues for them. Thanks everyone for your participation thus far! |
Allow Razor documents to be properly formatted.
@code/@functions
blocks (@code/@functions block formatting in Razor LSP world aspnetcore#19037)@{...}
blocks (Experimental support HTML formatting in Razor LSP #2445)@if(){..}
etc (https://github.com/dotnet/aspnetcore/issues/25475)Bug fixes:
The text was updated successfully, but these errors were encountered: