erlang-language-platform icon indicating copy to clipboard operation
erlang-language-platform copied to clipboard

Incorrect `active_signature` count when displaying signature help

Open offsetcyan opened this issue 1 year ago • 1 comments
trafficstars

Describe the bug

ELP sends an incorrect active_signature count when displaying signature help. According to https://github.com/helix-editor/helix/issues/11269 it's an off-by-one error.

To Reproduce

Write a self-recursive function where the call has the same number of arguments as the function of that name that takes the most parameters, writing the arguments inside already-complete parentheses. A crash, at least in Helix, only occurs modifying the final argument to a function call when all other arguments are supplied.

i.e.

-module(test).

f(_) -> f(). % this is fine.
f(_) -> f(1). % adding in this 1 post-hoc will crash Helix because of this incorrect count.

Expected behavior

An correct active signature count is sent by elp.

Actual behavior

An incorrect active signature count is sent by elp.

Context

  • ELP Version (output of elp version): elp 1.1.0+build-2024-07-16
  • Editor used:

offsetcyan avatar Aug 16 '24 21:08 offsetcyan

Here is a helix.log output which shows communication with the LSP.

offsetcyan avatar Aug 16 '24 22:08 offsetcyan

@offsetcyan This should be solved in the last release: https://github.com/WhatsApp/erlang-language-platform/releases/tag/2025-05-13

Could you please confirm that's the case?

robertoaloi avatar May 13 '25 11:05 robertoaloi

@offsetcyan Closing as fixed. If that's not the case, please reopen.

robertoaloi avatar May 14 '25 07:05 robertoaloi