haskell / haskell/haskell-language-server

Hover Documentation html file should be looked up from Haddock interfaces

Offen
#731 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
component: ghcide type: enhancement
Vorherrschende Sprache
Haskell
Sterne
3k
Forks
455
Ø Merge
2 T. 19 Std.
Gemergte PRs (30 T.)
11

Beschreibung

Will leave it here to track work in progress.

Sometimes "Documentation" in tooltip is absent because module that defines Name is different from haddock html file that contains it (usually some other module that re-exports the Name).

A [workaround/hack was created](https://github.com/haskell/ghcide/pull/766) for a common use case but it fails at more obscure cases. I have little idea how Haddock comes up with its file structure (rules seem to vary from package to package) but the interface file {package-name}.haddock in package root is the source of truth for Name doc resolution.

So far I managed to make it work only for GHC 8.10.2 (unfortunately `haddock-api` package that defines `readInterfaceFile` is not a part of most stable stackage snapshots and often conflicts with `haddock-library`, probably some upstream work is required).

Preview looks promising, seems that all 3rd party documentation is located properly. Some examples:

![image](https://user-images.githubusercontent.com/5116838/95653524-ccbd0f00-0b55-11eb-842c-28551531e14f.png)

Or list map

![image](https://user-images.githubusercontent.com/5116838/95653548-01c96180-0b56-11eb-905a-b6630feddea0.png)

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.