1

I have created a language support extension in vs code. Now I have added all the keywords to my tmLanguage.json file. But I see all the keywords are highlighted in a single color(Blue). Is there any way to add multi colors to my syntax highlighting? Like datatypes with one color and built-in functions with another color.

If yes, Please help me.

akhil
  • 105
  • 10
  • `built-in functions` are not keywords, add different scopes and assign a syntax color name to it – rioV8 Nov 20 '20 at 07:16
  • Hi @rioV8 Thanks for the comment. I have created a new scope called datatype. So Now how to set the color to it. In the same tmLanguage.json file or somewhere? If you have any links please share them. – akhil Nov 23 '20 at 05:20
  • the theme assigns a color to a particular scope, any language specific scope is mentioned in the theme, I recently viewed the json file for `One Dark Pro` theme – rioV8 Nov 23 '20 at 11:00
  • Theme assigns a single color for all the scopes. So to specify a different color for each scope we need to set it in the settings.json file I guess. – akhil Nov 24 '20 at 13:11
  • have a look at the `One Dark Pro` theme and see how they have specified scope ==> color – rioV8 Nov 24 '20 at 15:30

0 Answers0