dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
19.01k stars 4.03k forks source link

[LSP] [Bug]: New documentation comment tags are not closed automatically, manually closing results in automatic insertion #68481

Open just-ero opened 1 year ago

just-ero commented 1 year ago

Version Used: v2.0.206 of the C# Visual Studio Code extension.

Steps to Reproduce:

  1. Open any file with C# as the language mode.
  2. Create or take any documentation comment.
  3. Begin a new tag, such as <remarks>, and attempt to close it (either via the > character of the opening tag, or manually via </ of the closing tag).

Expected Behavior:

Typing the closing > of the opening tag should automatically add </remarks> after the cursor.
Typing </ after an opening tag, should complete the closing tag automatically.

Actual Behavior:

Typing the closing > of the opening tag does not do anything.
Typing < after an opening tag will display suggestions. The first suggestion is an XML comment (!--). Continuing to type with / will then insert this suggested snippet, resulting in, for example, <remarks><!---->/.

just-ero commented 1 month ago

Continuing to type with / will then insert this suggested snippet, resulting in, for example, <remarks><!---->/.

This at least appears to no longer be the case. The rest is still true.