dotnet / razor

Compiler and tooling experience for Razor ASP.NET Core apps in Visual Studio, Visual Studio for Mac, and VS Code.
https://asp.net
MIT License
505 stars 196 forks source link

Curly brace complrtion doesn't work in string interpolation is razor #6585

Open DoctorKrolic opened 2 years ago

DoctorKrolic commented 2 years ago

Version used: VS 2022 v17.3 Preview 2

To reproduce:

  1. Create Blazor server app
  2. Go to any component
  3. In any method of this component write var str = $"";
  4. Put your cursor between quotes
  5. Type {

Expected behavior: } as automatically inserted

Actual behavior: Nothing is automatically inserted: devenv_J2hQPYhR0p

Additional context: For C# all works fine: devenv_HI88I3NX6h

ryanbrandenburg commented 2 years ago

This is because our LanguageConfigurationJson deliberately does not encode all the C# rules. We're not sure exactly what the fix here would be, but are open to a PR.