erlang-language-platform
erlang-language-platform copied to clipboard
Incorrect `active_signature` count when displaying signature help
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:
Here is a helix.log output which shows communication with the LSP.
@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?
@offsetcyan Closing as fixed. If that's not the case, please reopen.