ocaml-lsp
ocaml-lsp copied to clipboard
Flatten signatures when they're not too long but are formatted in rows
With the following function:
let f ~(_conf : string list) ~(_backtrace : string list) x y = x +. y
If I ask its type with M-x lsp-describe-thing-at-point I have the following answer:
_conf:string list -> _backtrace:string list -> float -> float -> float
And if I put my cursor over it to have its type displayed simply:

Now, if I have instead this function:
let g ~(_conf : string list) ~(_backtrace : string list) ~(_path : string list)
x y =
x +. y
The type obtained with M-x lsp-describe-thing-at-point is:
_conf:string list ->
_backtrace:string list -> _path:string list -> float -> float -> float
And the hovered type is displayed like this:

I don't know if that's the expected behaviour but wouldn't there be a way to create a newline as late as possible and mark that there is still some type to display?
I tried installing ocamlformat-rpc as advised here but I couldn't see any difference. What is it supposed to do?