Reserved keyword coloring?
Would it be possible to get reserved word coloring on variables? It should match the color of the other reserved words, to make it more obvious that the variable name cannot be used.
Details
What editor are you seeing the problem in? VS Code
What version of the editor are you using? 1.22.2 and Insiders 1.23.0
What color theme are you using? Dark+ (default)
Repro
var event = new Dictionary<string, string>();
Ends up formatted like this, with no obvious sign that event is a reserved word:
Instead of any reserved word errors, I kept seeing a bunch of (seemingly unrelated) errors in the vicinity of this line of code. I finally opened the project up in Visual Studio for macOS and it became obvious:
This is a good request. Unfortunately, since VS Code handles syntax highlighting purely with regular expressions, it's pretty hard to do. Essentially, every single rule would also need to include a rule that matches reserved words. If anyone wants to take a stab at it, we'll consider taking it. I'm afraid it might slow down the regular expressions in general though.
Non-contextual keywords should just be detected in the same scope as this/base and built-in types (#260).
Could also argue that this is more about compiler error than syntax error, in which case the syntax highlighting should be more lenient and assume such syntax is valid.