Editor.TokenColorCustomizations#29393
Conversation
Caveat: colors update quickly, but font style does not. Also, this pack does not include defining the config schema
|
Thanks @hoovercj , very nice, it's exactly what I have imagined! About the issue of fontstyle changes not triggering a refresh: This sounds like a bug in the editor. |
|
I absolutely agree with waiting for the next release, @aeschli. We've waited this long, what's one more month? :-) You said that you added comments but I can't see any. |
| resultRules.push(rule); | ||
| if (!rule.scope) { | ||
| resultRules.push(rule); // push the rule | ||
| if (!rule.scope) { // if it doesn't have a scope...?? why? |
There was a problem hiding this comment.
not having a scope means is the set of default rules, such as the default background and foreground color. Each text mate theme has such a set of default rules, typically the first entry.
There was a problem hiding this comment.
Ok, that makes sense, thanks!
| // then find all the colorIds mapped to that setting, and set those to the color | ||
| // It is not yet clear to me what this looks like in practice | ||
| // * Remove all keys that aren't foreground or background | ||
| // Why remove fontstyle? |
There was a problem hiding this comment.
Removing fontstyle is an oversight, it should stay.
There was a problem hiding this comment.
When I go back in to remove my "question" comments, should I then also change if (key !== 'foreground' && key !== 'background') to if (key !== 'foreground' && key !== 'background' && key !== 'fontStyle')?
| } | ||
| if (this.hasCustomizationChanged(newColorCustomizations, newColorIds)) { | ||
|
|
||
| let newRules = this.getTokenColorCustomizations(); |
There was a problem hiding this comment.
Setting change notifications can happen quite often, cause by any change to settings. Mostly the change does not affect the custom colors. For that I tried to optimize the test for changes and avoid the creation of new data structures unless there is a change to the colors.
I'd suggest to not construct the rules array as in getTokenColorCustomizations, but just compare the old to the new settings.
The construction of the rules (as done in getTokenColorCustomizations) could be done inside setCustomTokenColors, like it is done with custom colors.
|
@aeschli is there any more action needed from me before merging this and getting insiders feedback? |
|
All looks good, thanks @hoovercj ! |
|
Will it be whole scopes list? |
|
Hi, just downloaded the new VS Code July 2017. Do you have a list of the syntax tokens available (comments, strings) for the editor.tokenColorCustomizations user setting? |
|
@mscottfowler the intellisense for the setting should show you all the options. For example, this is the gif from the release notes: You can see that If you want to be more specific, you can set ANY scope you want in the To find the scopes that you need to use, open the command pallette and search "TM Scopes" Then click anywhere in a file that you want to see what scopes are valid there. I hope that helps! |
|
Thanks, Cody. Much appreciated!
Scott Fowler
Designer/Front-end Developer
505-985-1960
http://www.madjaybird.com/
From: Cody Hoover <notifications@github.com>
Reply-To: Microsoft/vscode <reply@reply.github.com>
Date: Thursday, August 17, 2017 at 2:50 PM
To: Microsoft/vscode <vscode@noreply.github.com>
Cc: Scott Fowler <scott@madjaybird.com>, Mention <mention@noreply.github.com>
Subject: Re: [Microsoft/vscode] Editor.TokenColorCustomizations (#29393)
@mscottfowler the intellisense for the setting should show you all the options. For example, this is the gif from the release notes:
You can see that comments, functions, keywords, numbers, strings, types, and variables are options. If you use any of these, you'll change all comments, functions, etc. to the color you set.
If you want to be more specific, you can set ANY scope you want in the textMateRules section. This, too, is shown in the release notes.
To find the scopes that you need to use, open the command pallette and search "TM Scopes"
Then click anywhere in a file that you want to see what scopes are valid there.
I hope that helps!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
|
And WHY O Why.. has Microsoft VS Code not implemented this as a feature that's part of the customization?! |
|
@Mac-DevOSYandex This is a merged pull request so could you elaborate on what you mean? What do you believe is not implemented? |
|
Hey Cody Hoover,
Many thanks for getting back to me.
Here's the pun, $200 for cursive font and yet with few code changes to vs code main css we can achieve cursive font in code. I code in typescript most of the time and I code off line for a great deal of the time, therefore, I use vs code.
I came across this article (url below) and yes, it worked fine except, for the [unsportted] error message.
https://medium.com/@JeffHykin/how-to-get-cursive-fonts-in-vs-code-2018-without-operator-mono-220544fed93a
Once again many thanks..
Gio Gunn.
Sent with [ProtonMail](https://protonmail.com) Secure Email.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
…On Monday, January 7, 2019 5:44 PM, Cody Hoover ***@***.***> wrote:
***@***.***(https://github.com/Mac-DevOSYandex) This is a merged pull request so could you elaborate on what you mean? What do you believe is not implemented?
—
You are receiving this because you were mentioned.
Reply to this email directly, [view it on GitHub](#29393 (comment)), or [mute the thread](https://github.com/notifications/unsubscribe-auth/AZWNI_HGECg3xPbNmhgffAiSY2FfI8psks5vA4dpgaJpZM4OEeY1).
|





Addresses #27894
Caveat: colors update quickly, but font style does not. It will only update font style if I modify an affected token as shown in the gif below. Any ideas on what might cause that behavior?
Also, this pack does not include defining the config schema