Why is a plugin for auto signatureHelp required if it is built in?

I may miss something very obvious but I try to understand the state of the the builtin signatureHelp and why it doesn’t come up automatically in insert mode. The lsp-config plugin docs recommend a mapping for normal mode:

 buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)

But who would need signature help in normal mode?

So there is the ray-x/lsp_signature plugin which brings the missing auto-open feature. Unfortunately it seems to lack some options e.g. to move the position of the floating window (at least I couldn’t figure it out).

In fact I would even prefer how the built in implementation looks - if it would just open automatically.

So could someone enlighten me what’s the idea here? Why is a plugin required if the LSP protocol even defines trigger keys? Couldn’t they be used to bring up the built in popup automatically?

My opinion, (which I semi-inherited from talking with other neovim contributors) is that neovim in general should “get out of your way”. Popups are intrusive, and the built-in client generally tries to be as opt-in as possible.

1 Like

If you don’t like the plugin behavior, you can change it. It is open source.
But if it is built-in, it is harder.

I think the feature should be optional if possible.

1 Like

Hmm, ok, I totally can agree to that. But the method to bring up the popup is already there (vim.lsp.buf.signature_help()). What is it meant for? To me it seems like this feature is 90% complete but missing the final 10% to make it useful. That is: a configuration option to bring it up in insert mode when a trigger character is detected (ok - and some logic to make it disappear again, probably the harder part).

I know. Please don’t get me wrong. I appreciate that plugin. It’s just that I found the documentation somewhat confusing and some config options I tried had no effect at all. So I tried to learn more about how it works and came across vim.lsp.buf.signature_help() (which the plugin doesn’t even seem to use? It’s only mentioned in issue #1). This left me confused.

I personally think signature help, like hover, is useful without it being automatic. I’m not opposed to adding more utilities for at least simplifying the mappings if users want “automatic” things in their config.

Hmm, in my experience hover is what I want in normal mode and signature help is more an abbreviated version of the content I see on hover. It probably very much depends on the language you work with and the LSP you use (PHP with intelephense in my case).

Can you give an example how you use both hover and signature help in normal mode and how they differ for you?

Apart from that a built in implementation of auto signature help in insert mode definitely has my vote!

Apart from that a built in implementation of auto signature help in insert mode definitely has my vote!

Not necessarily this, but at least make it easier for you to set this up yourself in your config :slight_smile:

I don’t personally like/use auto-things, so it will probably be on the backburner for awhile unless someone files a PR.

Can you give an example how you use both hover and signature help in normal mode and how they differ for you?

I don’t use it that frequently, but the trigger range is different (within function argument text range) and the summary/args more concise.