Signature help stabilization
Feature Description
- Align the active argument with the argument in the text, grabbed via treesitter
- Detect location of function to optionally avoid showing signature help in multi-line functions (#1670)
- Support focusing the window
- Toggle visibility of documentation + signature vs just signature (Default <C-k> to
show_signature, show_signature_documentation, hide_signature) - Override built in
vim.lsp.buf.signature_help()? - Show in snippet mode
On 0.11,
signature = {
enabled = true,
trigger = {
enabled = false,
show_on_trigger_character = false,
show_on_insert_on_trigger_character = false,
},
},
still auto-shows whenever blink gets to something that has a signature. Not sure if a bug or intended behaviour right now.
What I'm after is for the signature to show up exclusively when I invoke it with a keymap -- like I would for vim.lsp.buf.signature_help()
Support focusing the window Override built in vim.lsp.buf.signature_help()?
These two would be particularly nice, or just an API function to manually activate the signature window. With some LSPs, this window can grow quite large so I don't want it to be always visible.
You can show the window with cmp.show_signature() already fyi and it's now bound to <C-k>
You can show the window with
cmp.show_signature()already fyi and it's now bound to<C-k>
Oh, didn't know that. Works fine, even as a toggle with hide_signature. Thanks, that's basically all I need.
You can show the window with
cmp.show_signature()already fyi and it's now bound to<C-k>
Is it intended that the signature always auto-shows right now though (when enabled as in the config above)? <C-k> is cool if I want to show it, after I hide it. But there doesn't seem to be a way to keep it hidden by default, and only toggle it on with a keymap.
That's not intended no, I'll look into it soon. Just been lacking time for this project recently
keymap = {
["<C-s>"] = { "show_signature", "hide_signature", "fallback" },
},
signature = {
enabled = true,
trigger = {
-- enabled = false, -- if I uncomment this, the keymap won't work anymore
show_on_trigger_character = false,
show_on_insert_on_trigger_character = false,
},
}
I'm not sure, but I think it was working before version 0.14.0.
I sometimes see the signature popup appear with the first method / function argument highlighted incorrectly, usually a few characters beyond the end of the variable and the delimiting , into the next argument are also highlighted, something roughly like the below.
foo(abc: &str, def: Vec<String>)
I've so far only seen this with Rust, and have not yet seen it enough to be able to say exactly when it appears. Typically signatures work well for me in numerous languages, I think this is the only time I've noticed a problem.
Is it useful for me to report this? Shall I try to investigate further?
do you consider make something like this as a default option? or there are some issues to execute it?
keymap = {
preset = 'default',
['<C-y>'] = {
function(cmp)
cmp.select_and_accept()
cmp.show_signature()
end,
},
},
Hi, how can I cycle through the overloading function with signature?
Hello, I want to show the signature documention with none scrollbar and rounded border. below is my configure but it is doesn't work
signature = { enabled = true, window = { scrollbar = false, border = "rounded", }, },
Not sure if this is related, but the keymappings (<C-b> and <C-f>) for scrolling documentation do not actually scroll documentation while the signature is shown and signature.window.show_documentation is set to true.
This happens with both scrollbar being set to true and false.
Update: Nevermind, I see b7e240484affbb62eebb8604ea3d63f88d320f12 fixes this but isn't on a release yet.
@Saghen anyway to get scroll_signature_up/down to work in select mode?
Hi, how can I cycle through the overloading function with signature?
i was looking for the same thing. is this a feature yet? some of the functions i have here got like 12 overloads and i cant see them all.. and as i typed that i accidentally discovered i can scroll the window. but having the current matching overload be on top with the others would be great, or just scroll the window to the matching overload so it looks like it is with the highlight on the correct param