jschaf / powershell.el

An Emacs mode for editing and running Microsoft PowerShell code.
93 stars 30 forks source link

Improve Eldoc functionality #10

Open punassuming opened 9 years ago

punassuming commented 9 years ago

Current Eldoc usage takes up multiple lines in the minibuffer and does not center on the top of the match. For example, hovering over Get-Content with eldoc-mode active shows this:

image

The function name is not at the top, and the wrap is extensive. I am currently looking into how to truncate lines. One other thing I noticed with the eldoc array script embedded in the file, is that its output shows multiple matches with a lot of whitespace in between:

(set (intern "Add-AppxPackage" powershell-eldoc-obarray) "
Add-AppxPackage [-Path] <string> [-DependencyPath <string[]>] [-ForceApplicationShutdown] [-InstallAllResources] [-WhatIf] [-Confirm] [<CommonParameters>]

Add-AppxPackage [-Path] <string> -Register [-DependencyPath <string[]>] [-DisableDevelopmentMode] [-ForceApplicationShutdown] [-InstallAllResources] [-WhatIf] [-Confirm] [<CommonParameters>]

Add-AppxPackage [-Path] <string> -Update [-DependencyPath <string[]>] [-ForceApplicationShutdown] [-InstallAllResources] [-WhatIf] [-Confirm] [<CommonParameters>]

Add-AppxPackage -MainPackage <string> [-Register] [-DependencyPackages <string[]>] [-InstallAllResources] [-WhatIf] [-Confirm] [<CommonParameters>]")

I can work on adjusting the output to make it streamlined as well as adding syntax highlighting in the mini buffer.

jschaf commented 9 years ago

I'm happy to take a look at whatever you develop.