Did you know you can inject languages into string literals with a comment in #JetBrainsRider? It will enable basic syntax highlighting and *some* code completion in the string literal. Additionally it will give you warnings if the string literal is not valid in the chosen language.

In .NET 7 you will also be able to use the StringSyntaxAttribute https://learn.microsoft.com/dotnet/api/system.diagnostics.codeanalysis.stringsyntaxattribute which also works in #VisualStudio. But attributes can't be used everywhere (e.g. for local variables).

#dotnet @dotnet

StringSyntaxAttribute Class (System.Diagnostics.CodeAnalysis)

Specifies the syntax used in a string.

@bitbonk yes, that's a pretty epic feature!