dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.88k stars 676 forks source link

Wrong Console token color #3690

Closed tomasalles closed 2 weeks ago

tomasalles commented 4 years ago

Hello,

Console is written in light blue as opposed to green. If you need more info please just ask, I've used CSharp report issue command.

Regards, tomasalles

tomasalles commented 4 years ago

In case you need more info:

Environment data

.NET Core SDK (reflecting any global.json): Version: 3.1.103 Commit: 6f74c4a1dd

Runtime Environment: OS Name: arch OS Version:
OS Platform: Linux RID: arch-x64 Base Path: /usr/share/dotnet/sdk/3.1.103/

Host (useful for support): Version: 3.1.3 Commit: 9678feff10

.NET Core SDKs installed: 3.1.103 [/usr/share/dotnet/sdk]

.NET Core runtimes installed: Microsoft.NETCore.App 3.1.3 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

VS Code version: Version: 1.43.2 Commit: 0ba0ca52957102ca3527cf479571617f0de6ed50 Date: 2020-03-24T07:52:11.516Z Electron: 7.1.11 Chrome: 78.0.3904.130 Node.js: 12.8.1 V8: 7.8.279.23-electron.0 OS: Linux x64 5.5.11-arch1-1

C# Extension version: 1.21.15

Steps to reproduce

Just wrote Console inside a method

Expected behavior

Console to be written in green

Actual behavior

Console written in light blue

tomasalles commented 4 years ago

Happens with Convert class too see image: https://imgur.com/zU9R3z7

JoeRobich commented 4 years ago

@tomasalles Thanks for the report. This is a limitation of the textmate grammar used to provide token classification. It doesn't have enough information to determine that the token 'Console' is not only an identifier but it is actually a class identifier. VS Code is adding a semantic classification API which will be able to provide a richer experience and we will support as soon as it is public.

tomasalles commented 4 years ago

Ok, will wait on it then, TYVM.

JoeRobich commented 2 weeks ago

Closing as the C# extension supports semantic highlighting .