Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
andyleejordan merged 6 commits into main from feature/addDocumentationNotes
Mar 4, 2025

Conversation

@JustinGrote
Copy link
Collaborator

@JustinGrote JustinGrote commented Feb 28, 2025
edited
Loading

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
image

Related: PowerShell/PowerShell#25112
image

  • Needs Tests

@JustinGrote JustinGrote marked this pull request as ready for review March 2, 2025 06:17
Copilot AI review requested due to automatic review settings March 2, 2025 06:17
Copy link
Contributor

Copilot AI left a 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.

Copy link
Collaborator Author

@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.

andyleejordan reacted with thumbs up emoji

Copy link
Member

@andyleejordan andyleejordan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing, thanks.

@andyleejordan andyleejordan merged commit 9d56407 into main Mar 4, 2025
8 checks passed
@andyleejordan andyleejordan deleted the feature/addDocumentationNotes branch March 4, 2025 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot Copilot left review comments

@andyleejordan andyleejordan andyleejordan approved these changes

Labels

Area-CodeLens Issue-Enhancement A feature request (enhancement).

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /