csharp-tmLanguage
csharp-tmLanguage copied to clipboard
interpolated strings interpolation should use different embedded scope
Details
VS Code 1.36 Custom Theme
The interpolated content in an interpolated string should use scope meta.embedded
from the point of punctuation.definition.interpolation.begin.cs
, which should really be punctuation.section.embedded.begin.cs
, to take advantage of most themes reversing the color back to standard code, for the meta.embedded scope, and special highlighting for the punctuation.section.embedded
scope.
Repro
From a section of the PowerShell repository:
An example of the mentioned scopes shown in a special build of the PowerShell tmLanguage file, showing PowerShell interpolated string content in a script:
For reference, here is VS Code's standard 'dark' theme definition:
{
"name": "String interpolation",
"scope": [
"punctuation.definition.template-expression.begin",
"punctuation.definition.template-expression.end",
"punctuation.section.embedded"
],
"settings": {
"foreground": "#569cd6"
}
},
There is nothing defined for interpolated
scope.