Open Trottero opened 2 years ago
+1 same issue here (and thanks for the workaround). Really hope this gets fixed.
I have the same problem here😥
Before Omnisharp loaded : We still can see the color they should have.
After : Some colors are gone
I solve them by downgrade the version to 1.23.17
Same exact issue here.
Before omnisharp loaded (or before 1.24 release, or with semantic highlighting disabled):
After omnisharp 1.24 loads:
The Roslyn classifier does not distinguish between "class name - declaration" and "class name - usage". This is a loss from the C# textmate grammar. However, the Roslyn semantic classification will always fully support new language features.
As a workaround you can disable "csharp.enableSemanticHighlighting" in your VS Code settings.
see Roslyn issue for the background discussion https://github.com/dotnet/roslyn/issues/36327 and a similar discussion for VS for Mac https://github.com/mono/monodevelop/issues/4506
we won't be able to support this until it's part of Roslyn so I think this issue can be closed as not possible to implement
see Roslyn issue for the background discussion dotnet/roslyn#36327 and a similar discussion for VS for Mac mono/monodevelop#4506
we won't be able to support this until it's part of Roslyn so I think this issue can be closed as not possible to implement
Both issues linked are from a couple of years ago, has the situation not improved since then?
Im having same issue, it was working in previous versions. I would prefer not to disable semantic highlighting
I just hit this issue when updating to 1.24 - nearly every word in C# files is either underlined or a different colour.
Like others above, I disabled "csharp.enableSemanticHighlighting" in both workspace and user to clean things up again. Also, the settings in VSCode say "Defaults to false" but both of these settings seem to default to true, and setting them to false highlights blue as a changed setting. I had to set both workspace and user settings to false to return to sanity.
Update: Omnisharp 1.24.1 is back to underlining classes, attributes, etc. that is really cluttering things up when using the Monokai theme. Is there any way to disable the constant underlining everywhere or is this entirely theme related?
I have edited my settings.json to include "editor.tokenColorCustomizations" scoped to the [Monokai] theme to declutter things. If anyone else is interested here's a snippet to remove underlines for types (classes, attributes);
"editor.tokenColorCustomizations": { "[Monokai]": { "textMateRules": [ { "name": "Remove type underline", "scope": "entity.name.type", "settings": { "fontStyle": "" } } ] }, }
Issue Description
Setting
csharp.semanticHighlighting.enabled
totrue
breaks syntax highlighting for base classes and attributes. This causes it to show up as a class definition, when in many themes it should have its own distinct color. Issue was tested on both the stable and insiders versions of vscode, log submitted is from insiders build.Setting
csharp.semanticHighlighting.enabled
tofalse
fixes the issue regarding base classes and attributes, but it also removes functionality such as highlighting for parameters which I prefer to be on.Issue does not occur instantly when starting VSCode, I can't get an exact timeframe but it seems to be linked to the analyzers loading.
Steps to Reproduce
.cs
fileSee screenshots below
Expected Behavior
Screenshots retrieved by setting
csharp.semanticHighlighting.enabled
tofalse
Monokai theme
Github dark theme
Actual Behavior
csharp.semanticHighlighting.enabled
totrue
Monokai theme
Github dark theme
Logs
OmniSharp log
C# log
Environment information
VSCode version: 1.64.0-insider C# Extension: 1.24.0
Dotnet Information
.NET SDK (reflecting any global.json): Version: 6.0.101 Commit: ef49f6213a Runtime Environment: OS Name: Windows OS Version: 10.0.22000 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\6.0.101\ Host (useful for support): Version: 6.0.1 Commit: 3a25a7f1cc .NET SDKs installed: 6.0.101 [C:\Program Files\dotnet\sdk] .NET runtimes installed: Microsoft.AspNetCore.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-downloadVisual Studio Code Extensions
|Extension|Author|Version| |---|---|---| |csharp|ms-dotnettools|1.24.0| |github-vscode-theme|GitHub|5.1.0|;Code
Csproj