Open cschierig opened 4 years ago
Ah, I see what you mean. Thanks for trying out Semantic Highlighting.
The problem is the scope we define for the semantic token is resolving to the themes comment colors, since a comment.documentation.name
colors isn't defined. Until we work out a suitable fix, you can try the newly included Visual Studio 2019 Light or Dark themes.
I don't have much experience with VS Code extension development, would it be possible to simply include the scope in a theme to fix this?
@CozyPenguin Since I'm not sure which theme you are currently using, if you are using Dark+ or Light+ VSCode themes, you can copy the following tweaks into your settings.json.
"editor.tokenColorCustomizations": {
"[Default Dark+]": {
"textMateRules": [
{
"scope": "comment.documentation",
"settings": {
"foreground": "#608B4E",
}
},
{
"scope": "comment.documentation.attribute",
"settings": {
"foreground": "#C8C8C8",
}
},
{
"scope": "comment.documentation.cdata",
"settings": {
"foreground": "#E9D585",
}
},
{
"scope": "comment.documentation.delimiter",
"settings": {
"foreground": "#808080",
}
},
{
"scope": "comment.documentation.name",
"settings": {
"foreground": "#569CD6",
}
},
]
},
"[Default Light+]": {
"textMateRules": [
{
"scope": "comment.documentation",
"settings": {
"foreground": "#008000",
}
},
{
"scope": "comment.documentation.attribute",
"settings": {
"foreground": "#282828",
}
},
{
"scope": "comment.documentation.cdata",
"settings": {
"foreground": "#808080",
}
},
{
"scope": "comment.documentation.delimiter",
"settings": {
"foreground": "#808080",
}
},
{
"scope": "comment.documentation.name",
"settings": {
"foreground": "#808080",
}
}
]
}
},
Also note that the C# extension now includes Visual Studio 2019 Light and Dark themes which closely match the themes used in VS.
For those who get here facing the same issue but doesn't use either Visual Studios 2019's themes nor VSCode's Dark+/Light+ themes, Joe's workaround is still perfectly fine. You just need to do two things:
Issue Description
When the new semantic highlighter for C# is enabled, XML documentation comments aren't highlighted anymore. When semantic highlighting is turned off, it works just fine.
Steps to Reproduce
Expected Behavior
XML tags in documentation comments should be highlighted
Actual Behavior
XML tags aren't highlighted when semantic highlighter is used.
Logs
OmniSharp log
C# log
Environment information
VSCode version: 1.45.1 C# Extension: 1.22.0
Dotnet Information
.NET Core SDK (gem�� "global.json"): Version: 3.1.300 Commit: b2475c1295 Laufzeitumgebung: OS Name: Windows OS Version: 10.0.19041 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\3.1.300\ Host (useful for support): Version: 3.1.4 Commit: 0c2e69caa6 .NET Core SDKs installed: 3.1.100 [C:\Program Files\dotnet\sdk] 3.1.300 [C:\Program Files\dotnet\sdk] .NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-downloadVisual Studio Code Extensions
|Extension|Author|Version| |---|---|---| |abnf|forivall|1.0.0| |auto-rename-tag|formulahendry|0.1.3| |bash-ide-vscode|mads-hartmann|1.10.2| |beautify|HookyQR|1.5.0| |better-comments|aaron-bond|2.0.5| |Bookmarks|alefragnani|11.2.0| |bracket-pair-colorizer-2|CoenraadS|0.1.4| |code-settings-sync|Shan|3.4.3| |code-spell-checker|streetsidesoftware|1.9.0| |colonize|vmsynkov|2.2.2| |csharp|ms-dotnettools|1.22.0| |csharpextensions|jchannon|1.3.1| |csharpfixformat|Leopotam|0.0.84| |docomment|k--kato|0.1.11| |dotnet-test-explorer|formulahendry|0.7.2| |EditorConfig|EditorConfig|0.15.1| |errorlens|usernamehw|3.1.1| |gc-excelviewer|GrapeCity|2.1.35| |git-graph|mhutchie|1.23.0| |gitignore|codezombiech|0.6.0| |gitlens|eamodio|10.2.1| |js-debug-nightly|ms-vscode|2020.5.2917| |language-haskell|justusadam|3.2.1| |language-x86-64-assembly|13xforever|2.3.0| |markdown-all-in-one|yzhang|3.0.0| |material-icon-theme|PKief|4.1.0| |msbuild-project-tools|tintoy|0.3.6| |npm-intellisense|christian-kohler|1.3.0| |open-in-browser|techer|2.0.0| |output-colorizer|IBM|0.1.2| |path-autocomplete|ionutvmi|1.13.6| |project-manager|alefragnani|11.0.1| |python|ms-python|2020.5.80290| |restructuredtext|lextudio|128.0.0| |rewrap|stkb|1.11.0| |search-node-modules|jasonnutter|1.3.0| |sort-lines|Tyriar|1.9.0| |TabOut|albert|0.1.6| |tinypng|andi1984|0.3.3| |todo-tree|Gruntfuggly|0.0.176| |turbo-console-log|ChakrounAnas|1.4.0| |vsc-material-theme|Equinusocio|32.6.0| |vscode-colorize|kamikillerto|0.8.17| |vscode-counter|uctakeoff|1.3.5| |vscode-csharp-snippets|jorgeserrano|0.3.1| |vscode-eslint|dbaeumer|2.1.5| |vscode-html-css|ecmel|0.2.3| |vscode-jumpy|wmaurer|0.3.1| |vscode-markdownlint|DavidAnson|0.36.0| |vscode-npm-script|eg2|0.3.12| |vscode-nuget-package-manager|jmrog|1.1.6| |vscode-solution-explorer|fernandoescolar|0.3.10| |vscode-wakatime|WakaTime|4.0.0| |vscode-xml|redhat|0.11.0| |vscode-yaml|redhat|0.8.0|;