dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.86k stars 671 forks source link

Support multi‑line doc comments #3376

Open ExE-Boss opened 4 years ago

ExE-Boss commented 4 years ago

Issue Description

Steps to Reproduce

Write a multi‑line doc comment, eg.:

/**
 * <summary>
 *  Class <c>Point</c> models a point in a two-dimensional plane.
 * </summary>
 */
public class Point 
{
    /** <summary>method <c>draw</c> renders the point.</summary> */
    void draw() {...}
}

Expected Behavior

The multi‑line doc comments are correctly highlighted and provide IntelliSense.

Actual Behavior

The multi‑line doc comments are treated as normal multi‑line comments.

Environment information

VSCode version: 1.39.2 C# Extension: 1.21.5

Dotnet Information ``` .NET Core SDK (reflecting any global.json): Version: 3.0.100 Commit: 04339c3a26 Runtime Environment: OS Name: Windows OS Version: 10.0.18362 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\3.0.100\ Host (useful for support): Version: 3.0.0 Commit: 7d57652f33 .NET Core SDKs installed: 3.0.100 [C:\Program Files\dotnet\sdk] .NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.0.0 [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-close-tag|formulahendry|0.5.6| |auto-complete-tag|formulahendry|0.1.0| |auto-rename-tag|formulahendry|0.1.0| |code-spell-checker|streetsidesoftware|1.7.18| |codesnap|adpyke|1.0.15| |csharp|ms-vscode|1.21.5| |dotfiles-syntax-highlighting|dotiful|0.1.0| |EditorConfig|EditorConfig|0.14.2| |firefox-devtools-theme|Heron|4.9.0| |gitlens|eamodio|10.1.1| |literally-html|webreflection|0.1.1| |material-icon-theme|PKief|3.9.1| |notepadplusplus-keybindings|ms-vscode|1.0.3| |npm-intellisense|christian-kohler|1.3.0| |path-intellisense|christian-kohler|1.4.2| |pegjs-language|SirTobi|0.1.0| |powershell|ms-vscode|2019.9.0| |prettier-vscode|esbenp|2.3.0| |remote-wsl|ms-vscode-remote|0.39.9| |restructuredtext|lextudio|114.0.0| |smoothscroll|cyansprite|1.0.4| |stylelint|shinnn|0.51.0| |vscode-docker|ms-azuretools|0.8.1| |vscode-eclipse-keybindings|alphabotsec|0.10.0| |vscode-eslint|dbaeumer|1.9.1| |vscode-npm-script|eg2|0.3.9| |vscode-nunjucks|exe-boss|0.1.0| |vscode-sort-json|richie5um2|1.17.0| |vscode-todo-highlight|wayou|1.0.4| |vscode-typescript-tslint-plugin|ms-vscode|1.2.2| |vscode-webidl|keqingrong|0.0.1|;
No3371 commented 4 years ago

AFAIK, adding 2 whitespace after a line of comment text will finish the line and make the following text appear as new line.

joro550 commented 4 years ago

I always thought doc comments looked more like:

/// <summary>
/// 
/// </summary>
/// <returns></returns>
JoeRobich commented 4 years ago

This either needs support in the C# textmate grammar or wait for the eventual move to semantic classification in LSP.

JoeRobich commented 4 years ago

@ExE-Boss Please try out the semantic highlighting in our 1.21.19-beta1 release.