Show parameter help in the parameter tooltips
Prerequisites
- [X] I have written a descriptive issue title.
- [X] I have searched all issues to ensure it has not already been reported.
Summary
Similar to how the completion tooltip for commands include a summary of the command, it would be nice if the parameters also included the parameter help. So for ls -Path the tooltip would show:
[string[]]
Specifies a path to one or more locations. Wildcards are accepted. The default location is the current directory (`.`).
Proposed Design
No response
Related to https://github.com/PowerShell/vscode-powershell/issues/3026, when we sort out some of the LSP stuff to keep this from lagging the interface (especially as help can be slow to resolve) or if we can't we can gate it behind a setting and warn that hovers may take longer to resolve.
I don't think there's a setting for the command help we get when completing command names and I haven't heard anyone complain about that so I'm not sure if a setting for this is really needed, but of course it doesn't hurt to have it.
I hadn't thought about showing the help when hovering over the parameter but that's a good idea as well.
It's certainly something I want to improve and I'll put it on my to-do list, we just may need to gate it behind a feature flag for some kinds of lookups if it turns out to really slow down the hover/completer
@MartinGC94 so as I recall there was an issue with the tooltip getting exposed. Do you see the tooltip in psreadline currently because I don't.
I assume you are referring to this issue: https://github.com/PowerShell/PowerShellEditorServices/pull/2222 ? The related PR hasn't been merged yet: https://github.com/PowerShell/PowerShell/pull/25108 so the only tooltip we have today is the type and name you see in the teal color of your screenshot.
@MartinGC94 yep that was it. I am updating how we pull from help so it is more discoverable and accessible. I'll try to nudge that other PR along but if it dies I have a way to provide the info at least to parameters.
@andyleejordan I am going to do a partial reimplementation of https://github.com/PowerShell/platyPS/tree/main/src/Transform to facilitate getting this to work until https://github.com/PowerShell/PowerShell/pull/25108 gets merged as it will likely stall during stabilization time for release coming up.
Ideally the PlatyPS team would spin some of this stuff off into a separate non-dependency assembly we could leverage without having to banana-monkey-jungle all of PlatyPS? Downside is they would need to support at least Transform as a public API, but we (as a community) wouldn't have parallel implementations. Thoughts?
CC @adityapatwardhan and @JamesWTruher as well for thoughts.