-
Notifications
You must be signed in to change notification settings - Fork 686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The only C# token not being coloured correctly is the enum type and member #4755
Comments
@katymariehughes So the difference between the TextMate highlighting and the Semantic highlighting is that the semantic highlighter knows what type an Identifier is when it is used. The reason you see the colors correct in your GameStatus class is because it is obvious from the declaration that the VS Code has a handy The good news is that since you are using semantic highlighting, you customize these colors by their semantic token name by configuring "editor.semanticTokenColorCustomizations": {
"[Visual Studio 2019 Dark]": {
"enabled": true,
"rules": {
"enumMember": "#D4D4D4",
"interface": "#b8d7a3",
"enum": "#b8d7a3"
}
}
}, Also, I noticed that the colors you are using are the same as in the included |
Hi Joe, Thanks for such a detailed response! I've removed all my text mate rules and replaced just with your semantic ones, but still no luck I'm afraid :( And yes I'm using the VS 2019 dark theme. The colours don't seem right at all, namespaces, constructor isn't green, 'or' keyword, 'Guard' static class, non-white properties, non-green interface. Really appreciate your help! The colouring is throwing me off haha, frustrating when you're trying to replicate the environment you're used to |
@katymariehughes It appears that your project may not be properly loading. Can you share the OmniSharp Log from the VS Code Output pane? |
Had to uninstall and reinstall VS Code to even get an output weirdly, ha!
|
A lot has changed with O# project loading since this issue was opened. If you are still having problems, please open a new issue at https://github.com/omnisharp/omnisharp-roslyn/issues |
Issue Description
I'm not able to recolour the enum type and member tokens, despite having
and
set under my
"editor.tokenColorCustomizations"
I try each variation of the scope that I can find on the internet, with
.cs
, without etc.The colouring is correct on the enum file itself, but it's usage in other classes is not. It makes it look like a static property on a class or something, e.g. GameStatus.Completed on the second image below.
OmniSharp log
C# log
Environment information
VSCode version: 1.60.0
C# Extension: 1.23.15
Mono Information
OmniSharp using built-in monoDotnet Information
.NET SDK (reflecting any global.json): Version: 5.0.302 Commit: c005824e35Runtime Environment:
OS Name: Mac OS X
OS Version: 11.0
OS Platform: Darwin
RID: osx.11.0-x64
Base Path: /usr/local/share/dotnet/sdk/5.0.302/
Host (useful for support):
Version: 5.0.8
Commit: 35964c9215
.NET SDKs installed:
3.1.411 [/usr/local/share/dotnet/sdk]
5.0.302 [/usr/local/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.17 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.8 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.17 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.8 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
Visual Studio Code Extensions
The text was updated successfully, but these errors were encountered: