Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow semantic token styles with undefined foreground and styles #89600

Closed
aeschli opened this issue Jan 29, 2020 · 1 comment
Closed

Allow semantic token styles with undefined foreground and styles #89600

aeschli opened this issue Jan 29, 2020 · 1 comment
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@aeschli
Copy link
Contributor

aeschli commented Jan 29, 2020

When we style semantic tokens, some style properties (foreground, bold, italic, underline) can be undefined.

  • when ColorTheme.getTokenStyleMetadata uses ColorId.None as foreground, we want the foreground of the underlying TextMate tokens to be used.
  • we need to extend the API to express that bold, italic, underline are set, not set or undefined.
@alexdima
Copy link
Member

alexdima commented Jan 29, 2020

Here is a good sample:

  • sample.ts:
const zz = 123;
  • settings.json
    "workbench.colorTheme": "Monokai Dimmed"
	"editor.tokenColorCustomizationsExperimental": {
		"variable": { "fontStyle": "underline" }
	},
	"editor.tokenColorCustomizations": {
		"textMateRules": [
			{
				"scope": "variable.other.constant.ts",
				"settings": { "foreground": "#63ee47" }
			},
		]
	}
  • when having "editor.semanticHighlighting.enabled": false:
    image

  • when having "editor.semanticHighlighting.enabled": true:
    image

Ideally, the color would be taken from the TM token and the underline should be taken from the semantic token:

image

@alexdima alexdima added bug Issue identified by VS Code Team member as probable bug verification-needed Verification of issue is requested labels Jan 29, 2020
@alexdima alexdima added this to the January 2020 milestone Jan 29, 2020
@alexr00 alexr00 added the verified Verification succeeded label Jan 30, 2020
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants