[ANN] Improve signature-help feature in Merlin

We, at Tarides, are very happy to announce some improvements made to Merlin’s `signature-help` feature!

As a reminder, `signature-help` is a feature in Merlin that displays the function signature and highlights the active parameter. In the editor, this is typically displayed in a tooltip, floating window, or minibuffer. For instance, the following image displays the `signature-help` for the function `exec_prog` in VSCode.

image

The implementation of the signature-help command had a few shortcomings, which have been fixed. These fixes are making the feature way more pleasant to use. Some of these improvements are already part of the last Merlin and ocaml-lsp releases, others will be included in the next release.

Results:

  • Merlin only displays `signature-help` information on the function parameters and no longer displays it on the function name.

  • `signature-help` displays the function’s information only for the active parameters, and no longer loops back to highlight the first parameter after the last one.

  • `signature-help` is now triggered even if used inside a `let .. in` binding, in which the `in` is not yet written after the function call

  • The optional parameters are now detected and highlighted when the active parameter starts writing one.

15 Likes

Congrat’s ! What an improvement!

2 Likes