csharp-tmLanguage icon indicating copy to clipboard operation
csharp-tmLanguage copied to clipboard

interpolated strings interpolation should use different embedded scope

Open msftrncs opened this issue 5 years ago • 1 comments

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: image

An example of the mentioned scopes shown in a special build of the PowerShell tmLanguage file, showing PowerShell interpolated string content in a script: image

msftrncs avatar Jul 25 '19 00:07 msftrncs

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.

msftrncs avatar Jul 25 '19 01:07 msftrncs