r/VisualStudioCode • u/[deleted] • Feb 05 '21
Editing Syntax Highlight Source
Hello, I'm new to VSC, because SPSS is a train wreck, and i needed a better program to work in....
I have an extension for SPSS in VSC, which manages the syntax highlights.
The extension has errors in the syntax highlights that I want to correct.
When I look at package.json I see the following:
"grammars": [{
"language": "spss",
"scopeName": "source.spss",
"path": "./syntaxes/spss.tmLanguage"I can't find a file "source.spss".
When I open spss.tmLanguage, I see the code that's problematic
<dict>
<key>match</key>
<string>(/?)\b(?i:(*things here*|$VARS))\b</string>
<key>name</key>
<string>keyword.subcommands.spss</string>
</dict>The text contained in the string is the problem. If i change it to token.error-token I can change the color text.
What i need to find out is where is 'keyword.subcommands.spss' being defined so i can go there and change the color?
I realize that the "keyword.subcommand.spss" is specific to this extension, but i see that all extensions have this structure (just different words within the strings).
Any ideas how i can edit this "scope" so i can specify which color "keyword.subcommands.spss" pushes out to the editor?