Introducing Swift for Visual Studio Code

the highlighting is not done by VSCode, it is done by sourcekitd. this is the issue i was alluding to earlier in this thread.

the reason you are seeing a colored await is likely because you have the syntax highlighting turned off, in your settings.json, or whatever VSCode theme you are using. because the highlighter is disabled, the editor attempts to apply the heuristics in swift.tmLanguage.json instead, which knows how to highlight await but is less accurate elsewhere.

i've observed a similar problem with #if, #else and friends, but because the VSCode swift extension doesn’t attempt to label them (whereas it labels await as an identifier), it is possible to provide a fallback for those in a way that is not possible for await and async, and probably override and the other contextual keywords as well.

(note: i don’t know why the preprocessor macros don’t get highlights, these labels exist in sourcekitd, and Atomic Blonde was always able to access them, so my guess is the VSCode extension is just discarding them.)