Closed worldbeater closed 6 years ago
Now all local variables and fields use light orange color. Again, not sure light orange color is exactly what we need, but in my point of view it looks rather pretty now 😸
It's kind of weird that the instance variables when defined are orange, the parameters are orange and yet reference to the instance variables and parameters are black. (Most obvious in the constructor). We should compare this with syntax highlighting in VS and on Github.com for other similar languages (TypeScript, Java)
@damieng Typescript uses light orange approach, Java does also. But I completely agree with you that different colors in method arguments and in method implementation bring some inconsistency...
This is how it will look like with black fields, variables, and parameters.
I think black is a better match for what C# users expect. In fact it's kind of odd that we color the method names as entity names as well. (Both appear in black in the default VS theme)
I think method names can be colored in blue like in C++, but I don't know how to implement this. :(
There were several issues (first, second) on UserVoice where people were asking to implement method highlighting in Visual Studio, but Visual Studio team closes them one by one. But methods highlighting is implemented in ReSharper which is loved by .NET developers, in Rider IDE and in Visual Studio Code. IMHO we are on the right way, Visual Studio is something stuck in 2007 :)
I think the method naming is fine - it's consistent on both the declaration and the calling/reference.
Instance variables and parameters definitely look better when they match references to them in code blocks (as in your example in black) otherwise the visual association loses it's point.
I've created a poll in russian .NET developers chat in Telegram and most people also voted for black highlighting. So I close this PR containing light orange highlighting while this is not what we need exactly.
UPD: In case someone is reading this, we are now using black color for methods and props.
Implements better parameters highlighting for methods, lambdas, constructors, delegates. Uses language-java approach. See demo on GitHub Lightshow. BTW still not sure about colors. Maybe black color will be more pretty, maybe light orange is just fine, don't know. So came up with using one that Java highlighter does.