-
Notifications
You must be signed in to change notification settings - Fork 235
Surface Additional Parameter Documentation/Tooltips #2222
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
Conversation
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.
PR Overview
This PR surfaces additional parameter documentation in completion tooltips by enhancing type extraction logic and updating completion items.
- Updated TryExtractType to also extract documentation and adjusted completion item creation accordingly.
- Added tests for verifying both type and documentation extraction and refactored symbol assertions for improved clarity.
Reviewed Changes
File | Description |
---|---|
src/PowerShellEditorServices/Services/TextDocument/Handlers/CompletionHandler.cs | Updated TryExtractType signature and its usage to extract and populate documentation for parameter and variable completion items. |
test/PowerShellEditorServices.Test/Language/CompletionHandlerTests.cs | Added tests to validate type and documentation extraction from tooltip text. |
test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs | Refactored symbol assertions to use Assert.Single with predicate lambdas for concise filtering. |
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
@andyleejordan ready for review. Won't really do anything until this stuff gets populated on the PS side, but it does fix some tests and lints as well. |
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.
Amazing, thanks.
Fixes an issue in type parsing where, if a type is discovered, additional documentation gets trimmed off. This restores that to the
Documentation
field.I did a little experimenting with the new LabelDetail fields in LSP 3.17, but at least in vscode there was little to no visual advantage, something to maybe explore more later.
Would be nice to not have to text parse a string like this but it's where we are at currently with PS API
Related: PowerShell/PowerShell#25108

Related: PowerShell/PowerShell#25112
