-
Notifications
You must be signed in to change notification settings - Fork 251
Documentation missing for references to things defined in the same file #1261
Copy link
Copy link
Closed
ocaml/opam-repository
#18494Description
Given an input, a.ml:
(** f docs *)
let f = ()
(** g docs *)
let g = ()
let h = gWhen the point is on the reference to g, all is well:
$ ocamlmerlin single document -verbosity 0 -position 7:9 < a.ml | jq .value
"g docs"
However, if we change h to be let h = f, the documentation for f is not returned:
$ ocamlmerlin single document -verbosity 0 -position 7:9 < a.ml | jq .value
"No documentation available"
If we remove the documentation comment for g though (note the changed line number to correspond), the documentation for f is found:
$ ocamlmerlin single document -verbosity 1 -position 6:9 < a.ml | jq .value
"f docs"
It seems that, for lookups of things defined in the same file, merlin will not return documentation for any but the final documented definition.
(Originally reported in ocamllabs/vscode-ocaml-platform#519, where @ulugbekna suggested the actual failure pattern.)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels