dotnet / vscode-csharp

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

Highlighting appears to be broken when using multi-line strings #4022

Open erichiller opened 4 years ago

erichiller commented 4 years ago

Issue Description

Highlighting appears to be broken when using multi-line strings. See the below, red characters and other strangeness. They aren't marked as errors, it is purely syntax highlighting.

Possibly related to #3718

I have tried this both with and without semantic highlighting (setting the below to both be true or false).

{
    "csharp.semanticHighlighting.enabled": true,
    "editor.semanticHighlighting.enabled": true,
}

If there is something more I can provide let me know! Thanks

image

This is a triple dash comment (A different issue, I know, but possibly related), it doesn't like & image

Steps to Reproduce

Environment information

VSCode version: 1.48.1 C# Extension: 1.23.1

Dotnet Information .NET Core SDK (reflecting any global.json): Version: 3.1.401 Commit: 39d17847db Runtime Environment: OS Name: Windows OS Version: 10.0.18363 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\3.1.401\ Host (useful for support): Version: 3.1.7 Commit: fcfdef8d6b .NET Core SDKs installed: 3.1.102 [C:\Program Files\dotnet\sdk] 3.1.302 [C:\Program Files\dotnet\sdk] 3.1.401 [C:\Program Files\dotnet\sdk] .NET Core runtimes installed: Microsoft.AspNetCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download
Visual Studio Code Extensions |Extension|Author|Version| |---|---|---| |auto-using|Fudge|0.7.15| |better-align|wwm|1.1.6| |csharp|ms-dotnettools|1.23.1| |docomment|k--kato|0.1.18| |errorlens|usernamehw|3.2.1| |gitignore|codezombiech|0.6.0| |graphql-for-vscode|kumar-harsh|1.15.3| |hexeditor|ms-vscode|1.2.1| |jsdoc-markdown-highlighting|bierner|0.0.1| |markdown-all-in-one|yzhang|3.2.0| |msbuild-project-tools|tintoy|0.3.8| |path-intellisense|christian-kohler|2.2.1| |powershell-preview|ms-vscode|2020.7.0| |rainbow-csv|mechatroner|1.7.1| |remote-ssh-edit|ms-vscode-remote|0.51.0| |selected-lines-count|gurumukhi|1.4.0| |sqltools|mtxr|0.23.0| |svg|jock|1.3.8| |theme-karyfoundation-themes|karyfoundation|20.0.3| |todo-tree|Gruntfuggly|0.0.178| |vscode-docker|ms-azuretools|1.5.0| |vscode-eslint|dbaeumer|2.1.8| |vscode-great-icons|emmanuelbeziat|2.1.47| |vscode-json5|mrmlnc|1.0.0| |vscode-scss|mrmlnc|0.9.0| |vscode-scss-formatter|sibiraj-s|2.0.2| |vscode-solution-explorer|fernandoescolar|0.3.11| |vscode-yaml|redhat|0.10.0|;
jmarolf commented 4 years ago

We believe that this is a bug in the VS Code implementation of semantic highlighting @JoeRobich will file a bug in the https://github.com/microsoft/vscode repo. Keeping this bug open until that is done.

ghost commented 3 years ago

at today is still broken

harrybin commented 6 months ago

is there any extension or workaround to fix this?