-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Insert doc comments when typing via LSP #46301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.