Show package descriptions in Cabal plugin
This PR adds a proof of concept for showing the description for a package when it's hovered in a .cabal file, e.g.:
This uses cabal info <package name> under the hood and parses its output.
Huh, apparently hoistMaybe was added only recently. It's trivial to add our own impl but probably not worth it for this poc.
I discussed this feature with @wz1000 and GHC is aware of all the package databases in the current compiler session. The package database contains the relevant info (e.g. ghc-pkg --global describe base), so we should be able to read the package db somehow (maybe even via Cabal), and then look for the package with the given name.
In short, there should be a way forward for this feature, that avoids calling cabal info, which is great :)
Great news! I'll happily incorporate that. Do you have any specific ideas for a way forward?
Not yet, I need to do some research, but Ill write it down and let you know once I have some idea :)