dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.86k stars 673 forks source link

Indentation not work if use HtmlTagHelper without quote #5119

Open nowlights opened 2 years ago

nowlights commented 2 years ago

Environment data

dotnet --info output: SDK do .NET (refletindo qualquer global.json): Version: 6.0.101 Commit: ef49f6213a

Ambiente de runtime: OS Name: Windows OS Version: 10.0.22000 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\6.0.101\

Host (useful for support): Version: 6.0.1 Commit: 3a25a7f1cc

.NET SDKs installed: 5.0.402 [C:\Program Files\dotnet\sdk] 6.0.101 [C:\Program Files\dotnet\sdk]

.NET runtimes installed: Microsoft.AspNetCore.All 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

VS Code version: 1.65.1 C# Extension version: 1.24.1

OmniSharp log

Steps to reproduce

Create an asp.net core mvc project, add HtmlTagHelper without quotes

Expected behavior

Formated the indentation

Actual behavior

Not formated indentation


If i used any html tag helper without quote, indentation not work,

Indentation not work:

partial name="_PartialView" model=@Model
input class=".." asp-for=@Model.Text 

Indentation work:

partial name="_PartialView" model="@Model"
input class=".." asp-for="@Model.Text"
nohwnd commented 2 years ago

@NTaylorMullen Please help us here 🙂

NTaylorMullen commented 2 years ago

I'm not quite sure the ask. What sort of indentation are you refering to @nowlights ?

nowlights commented 2 years ago

I use asp.net core mvc, the indentation I say is Ctrl+Shift+P.

If I use tags without quotes, the indentation doesn't work

NTaylorMullen commented 2 years ago

I use asp.net core mvc, the indentation I say is Ctrl+Shift+P.

If I use tags without quotes, the indentation doesn't work

As in image ?

nowlights commented 2 years ago

Yes!