merlin icon indicating copy to clipboard operation
merlin copied to clipboard

document doesn't work reliably in source files

Open copy opened this issue 1 year ago • 0 comments

For example, it doesn't work when the expression after a toplevel let is on its own line:

% cat test.ml 
let foo =
  ()
(** COMMENT *)

let () = foo
% cat test.ml | ocamlmerlin single document -position 5:11 
{"class":"return","value":"No documentation available","notifications":[],"timing":{"clock":1,"cpu":1,"query":0,"pp":0,"reader":0,"ppx":0,"typer":1,"error":0}}

While this works as expected:

% cat test.ml 
let foo = ()
(** COMMENT *)


let () = foo
% cat test.ml | ocamlmerlin single document -position 5:11 
{"class":"return","value":"COMMENT","notifications":[],"timing":{"clock":1,"cpu":1,"query":0,"pp":0,"reader":0,"ppx":0,"typer":1,"error":0}}

copy avatar Aug 08 '22 19:08 copy