microsoft / TypeScript-TmLanguage

TextMate grammar files for TypeScript for VS Code, Sublime Text, and Atom.
MIT License
413 stars 126 forks source link

Fix `undefined` keyword highlighting #982

Closed armanio123 closed 1 year ago

armanio123 commented 1 year ago

Removes constant.language.undefined.ts from the scope so that the constant.language scope can pick it up.

Fixes: https://developercommunity.visualstudio.com/t/JavaScript:-undefined-not-highlighted-/10358005

VS before : image

VS After: image

armanio123 commented 1 year ago

By removing the scope, I'm actually making the constant.language scope, identify and pick up the syntax highlight for undefined. In Visual Studio all constants are mapped to keyword classification. There's no classification defined for "constants" yet.

In regard to the change, I think it will not break others. As far as I know, this file is only used by Visual Studio.