Currently, the signature of the current function the pointer is on is shown as follows:

enter image description here

as you can see, the signature is so large that it overflows the echo area. I was wondering if there could be a way to shorter to something like this:

1/1 | FunctionName(..., current_arg type, ...) (return_type_n, return_type_m)

in other words, the signature from the screenshot shows as:

1/1 | CreateSubscription(..., identificacion_tipo model.IdentificacionTipo, ...) (*service.Subscription, error)
  • If you don't get a good answer here that points to an existing easy way to take care of this, consider filing an enhancement request: M-x report-emacs-bug.
    – Drew
    Commented Oct 11, 2020 at 20:13

1 Answer 1


The string displayed by lsp-mode is not generated by lsp-mode but by the server. If you want to achieve that open a feature request against the server that you are using.

  • I would think that a language server would neither know nor care how that text is displayed? I was imagining this was eldoc rather than lsp, but either way Emacs knows the width of the window and could constrain the display to a single line (perhaps more likely by a simple truncation at the end than the kind of "intelligent" hiding of particular substrings indicated in the question).
    – phils
    Commented Oct 12, 2020 at 13:11
  • 1
    They control the amount and the format of the text to be shown. Some of them have settings like that for onHover info. Truncating can be implemented on client-side. If OP is fine with that, he can open feature request in lsp-mode repo. Commented Oct 12, 2020 at 14:17
  • @IvanDimitrovYonchovski I've decided to open a feature request github.com/emacs-lsp/lsp-mode/issues/2269
    – shackra
    Commented Oct 17, 2020 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.