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] XML Doc Comment completions don't set the cursor properly in Razor #63811

Open davidwengier opened 2 years ago

davidwengier commented 2 years ago

Given the following Razor doc:

@code
{
    /// <summary>
    /// <see$$
    /// </summary>
    publiv void M()
    {
    }
}

Invoking completion (at $$) correctly completes <see cref=""> but the caret is simply place at the end of that string, not between the quotes. Seems the caret information is lost when converting the completion item to an LSP completion item, even though we do check if the client supports snippet behaviour, so should be able to set the cursor location (right?)

davidwengier commented 2 years ago

David B was already looking into this: https://github.com/dotnet/roslyn/pull/60499

@dibarbet was there an issue for that PR that I can dupe this against? Or do you want to use this to track that?