LSP: `triggerCharacters` for signature help declared by servers do not seem to be respected
Summary
In Zed's implementation of the signature help feature, it seems that the triggerCharacters registered from the server side are not being respected.
Description
Currently, signature help only appears when typing foo(|, but if you enter another character after that, the signature help immediately disappears.
For example, even if "," is specified as a triggerCharacter, when typing foo(xxx,|, the signature help disappears.
Steps to reproduce:
- Enable the
"auto_signature_help"setting - Set up a language server extension that implements signature help functionality
- Try the signature help, invoking with typing
( - Then type another character like
x, with signature help disappearing
An example extension where this issue occurs is https://github.com/aviatesk/zed-julia/tree/avi/JETLS, and you can reproduce the issue by following the setup instructions in the README and checking out JETLS to this branch.
Expected Behavior:
Signature help should be triggered each time the triggerCharacters declared by the server are typed.
What's very confusing is that in the bundled rust extension, this issue doesn't seem to occur, and once signature help is triggered, it appears to continue being triggered (or "re-triggered"?) even after typing characters.
Currently, it seems that contextSupport is not declared as a zed client capability:
https://github.com/zed-industries/zed/blob/f13f2dfb70f28fae4f844d99b80d875588501a8f/crates/lsp/src/lsp.rs#L772-L784
So it's probably not the case that this issue is being avoided because rust-analyzer has set retriggerCharacters.
Zed Version and System Specs
Zed: v0.188.5 (Zed) OS: macOS 15.5.0 Memory: 32 GiB Architecture: aarch64