0

Can someone please identify how I could change specific instances of text to match Codecademy's syntax style? There is a syntax theme on vs code but it is way off. I was able to change the font type to make it more similar, but for instance when I'm creating a function, my parameters change to a dark blue after I enter them instead of the aqua they start with. A more specific example is changing Boolean values to be purple. Based on a cursory glance of vs codes capabilities I seem to remember someone mentioning that you could identify a property within the code and then change it in settings.

Could someone please highlight how I could go about identifying the specific type I want to change (in this case Boolean to purple), and then how to implement it?

I would have added this to the vs code forums but it seems this is the place to get the proper answers.

Thank you in advance.

Celerius
  • 31
  • 4
  • it is not `syntax style` but `syntax highlighting`, use setting `editor.tokenColorCustomizations` – rioV8 Aug 13 '20 at 05:51
  • So how do I identify which is which? For instance if I wanted to identify the parameter color defined within a function how would I change it to be a specific color? – Celerius Aug 14 '20 at 02:27
  • use `Developer: Inspect Editor Tokens and Scopes` – rioV8 Aug 14 '20 at 05:56
  • So now I can get the exact RGB code front the inspector, but I still do not know how to assign that specific code. It shows the font style etc but I don't know how to create a new style that will emulate the style in question Is there a setting that I can go to, or a template that I can create that will allow me to set these specific opinions to the color I want based on what identified they have? I apologize for the drawn-out post but if someone could please just give an example of how to either create a template from scratch or use a pre-existing template and edit it I would be so grateful. – Celerius Aug 14 '20 at 06:40
  • what do you get when you search SO or the Web for `editor.tokenColorCustomizations` – rioV8 Aug 14 '20 at 07:38
  • It shows that you can edit the colors, but I don't know which file to create the editor.tokenColorCustomizations{} and was hoping for a simple walkthrough. forget it – Celerius Aug 14 '20 at 19:43
  • ==> `settings.json` – rioV8 Aug 14 '20 at 22:05
  • So thank you for yor help thus far. I have googled editor.tokenColorCustomizations and I have an idea of what I need to do to change the color, but I also saw an issue where the theme had more specificity and therefore took precedence for the syntax highlight. – Celerius Aug 15 '20 at 13:16
  • you can specify the theme as part of the customization and only customize some textmate rules for that theme – rioV8 Aug 15 '20 at 13:24
  • Again apologies for my ignorance with VS code, but how do I specify the theme as part of the customization? Should I just past my settings.json file (the portion in question) and perhaps you could show me how to change the boolean rule so I can fix the rest on my own? My hangup here is that I don't know how to find the specifiers ("activityBarBadge.background" for example - I thought that using developer- inspect tokens would show me that field but it doesnt, where do I find it?) Again thanks for your patience and help. – Celerius Aug 15 '20 at 13:30
  • `activityBarBadge.background` what does that have to do with `syntax highlighting` it is a workbench color that you can customize too. https://stackoverflow.com/a/62879489/9938317 or any other from https://stackoverflow.com/search?q=editor.tokenColorCustomizations – rioV8 Aug 15 '20 at 15:10
  • I have never been taught any of this. When i looked at the customization in the theme I was using I used activityBarBadge.background with the rbg code as an example of what I thought i needed to do to change the color of specific types of code. wouldnt it be easier instead of telling me how ignorant I am to just write a quick run through on how to find the identifier for a type of code and then assign a color to it? --thanks for the link. – Celerius Aug 15 '20 at 23:27

0 Answers0