coc-powershell
coc-powershell copied to clipboard
Get help for cmdlet
resolves #26
Adding the powerShell/showHelp
message.
This currently only gets help for the function test. This is the framework to get it working. Next step is determining what to send to PSES. I suspect we could do like vscode-powershell and if in Visual mode, send the contents of the highlight, if in a normal mode, then we get the current word (with expansion across the hyphen).
Curious, what's the difference between showHelp and onHover? A few VSCode extensions now support "info pane" which places help info in a persistent window -- guess showHelp is similar?
Edit: if that's the thing, then I'll definitely map it to <F1>
! :D
Curious, what's the difference between showHelp and onHover?
showHelp sends a string to PSES which then evaluates it against Get-Help
with -ShowOnline
so it will open the online help. If there is no online help (or we can't reach the online help URI) then it will just output into the PSIC
thanks for the explanation.
I just played with it for a few commands, but it keeps landing on a 404 page.
For example:
Get-Help -Online Get-ChildItem
gets me: https://docs.microsoft.com/en-us/powershell/module/4.0/microsoft.powershell.core/providers/FileSystem-Provider/Get-ChildItem-for-Filesystem