Insert doc comments when typing via LSP#46301
Conversation
src/Features/LanguageServer/Protocol/Handler/Initialize/InitializeHandler.cs
Show resolved
Hide resolved
...ures/Core/Implementation/DocumentationComments/AbstractDocumentationCommentSnippetService.cs
Outdated
Show resolved
Hide resolved
dibarbet
left a comment
There was a problem hiding this comment.
mostly looks good - if there are any areas in the doc comment service where you made material logic changes instead of mostly copy paste let me know
src/EditorFeatures/CSharp/DocumentationComments/DocumentationCommentSnippetService.cs
Show resolved
Hide resolved
...ures/Core/Implementation/DocumentationComments/AbstractDocumentationCommentSnippetService.cs
Outdated
Show resolved
Hide resolved
...ures/Core/Implementation/DocumentationComments/AbstractDocumentationCommentSnippetService.cs
Outdated
Show resolved
Hide resolved
...ures/Core/Implementation/DocumentationComments/AbstractDocumentationCommentSnippetService.cs
Outdated
Show resolved
Hide resolved
src/EditorFeatures/Core/Implementation/DocumentationComments/DocumentationCommentSnippet.cs
Show resolved
Hide resolved
src/EditorFeatures/VisualBasic/DocumentationComments/DocumentationCommentSnippetService.vb
Show resolved
Hide resolved
src/Features/LanguageServer/Protocol/Handler/OnAutoInsert/OnAutoInsertHandler.cs
Outdated
Show resolved
Hide resolved
src/Features/LanguageServer/ProtocolUnitTests/OnAutoInsert/OnAutoInsertTests.cs
Show resolved
Hide resolved
allisonchou
left a comment
There was a problem hiding this comment.
LGTM 🎉 (though I'd probably get another approval in addition just to be sure) All of my comments are nits, although I didn't look too closely at the move to service since I'm assuming it's just code being moved over.
src/Features/LanguageServer/Protocol/Handler/OnAutoInsert/OnAutoInsertHandler.cs
Outdated
Show resolved
Hide resolved
src/Features/LanguageServer/Protocol/Handler/OnAutoInsert/OnAutoInsertHandler.cs
Outdated
Show resolved
Hide resolved
src/Features/LanguageServer/Protocol/Handler/OnAutoInsert/OnAutoInsertHandler.cs
Outdated
Show resolved
Hide resolved
The only change of note with the existing code is that in the command handler, two of the operations did an |
|
All of the PR feedback has been addressed |
Fixes AB#1155667
Adds support to LSP for inserting doc comments during typing, both when typing '///' above a method/class, or when pressing enter within a doc comment.
You'll pretty much have to review commit-by-commit, since the first commit is a straight cut and paste of code into a service without modification. Clean up comes later to make reviewing it easier.