dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.87k stars 675 forks source link

Add more detailed scopes to C# language rules, to allow finer syntax coloring control #4896

Open kraybit opened 2 years ago

kraybit commented 2 years ago

Feature Request Description

Suggestion

"editor.tokenColorCustomizations": {
  "textMateRules": [
    {
      "scope": "storage.modifier.public",
      "settings":{"foreground": "#F00"}
    }
  ]
}

Example of what does not work right now, as storage.modifier.public does not exist.

History

This issue was originally posted on microsoft/vscode

Environment information

VSCode version: 1.62.2 C# Extension: 1.23.16

Dotnet Information .NET SDK (reflecting any global.json): Version: 5.0.402 Commit: e9d3381880 Runtime Environment: OS Name: Windows OS Version: 10.0.19043 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\5.0.402\ Host (useful for support): Version: 5.0.11 Commit: f431858f8b .NET SDKs installed: 5.0.103 [C:\Program Files\dotnet\sdk] 5.0.402 [C:\Program Files\dotnet\sdk] .NET runtimes installed: Microsoft.AspNetCore.All 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Visual Studio Code Extensions |Extension|Author|Version| |---|---|---| |bio-dark-theme|studiobio|0.1.5| |cpptools|ms-vscode|1.7.1| |csharp|ms-dotnettools|1.23.16| |material-icon-theme|PKief|4.10.0| |theme-dracula|dracula-theme|2.24.0| |todo-tree|Gruntfuggly|0.0.214| |unity-code-snippets|kleber-swf|1.3.0| |unity-debug|Unity|3.0.2| |vscode-counter|uctakeoff|2.3.0| |vscode-theme-onedark|akamud|2.2.3| |vscode-unitymeta|PTD|0.0.7|;
JoeRobich commented 2 years ago

@kraybit This extension uses Roslyn for semantic colorization, when "csharp.semanticHighlighting.enabled" is "true". Could you make this request againt Roslyn to provide this extra semantic information https://github.com/dotnet/roslyn/issues