Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to ignore {,re}trigger characters for signatureHelp #89

Closed
griwes opened this issue Oct 11, 2024 · 3 comments
Closed

Add an option to ignore {,re}trigger characters for signatureHelp #89

griwes opened this issue Oct 11, 2024 · 3 comments
Labels
feature New feature or request signature Related to the signature help trigger Module which decides when to show windows

Comments

@griwes
Copy link

griwes commented Oct 11, 2024

Currently, the plugin only invokes textDocument/signatureHelp when at a trigger character (or at retrigger if already active). This is fine when initially typing a function call, but if you need to edit the middle of an argument, signature help will not trigger, and that would often be helpful.

Therefore - can we get an option to ignore the server provided trigger characters and always trigger signatureHelp on InsertEnter, CursorMovedI, and TextChangedI? This could be worked around with some autocmds, but it'd be much more elegant to do in the plugin itself.

@griwes
Copy link
Author

griwes commented Oct 11, 2024

Hmm, actually, autocmd InsertEnter * lua require('blink.cmp.trigger.signature').show() works, because the plugin currently keeps the context around until you exit insert mode, it seems - but I doubt that this behavior is expected / stable?

@Saghen Saghen changed the title Feature request: add an option to ignore {,re}trigger characters for signatureHelp Add an option to ignore {,re}trigger characters for signatureHelp Oct 24, 2024
@Saghen Saghen added feature New feature or request trigger Module which decides when to show windows labels Oct 24, 2024
@debugloop
Copy link

Additionally: I use completion.list.selection = "auto_insert" and sometimes I don't accept a result but just continue to type. Signature help does not kick in then either.

E.g. I complete a function call and after selecting I have it inserted as fmt.Printf| (pipe is my cursor). If I just go for a (, making my text fmt.Printf(|), I will not get the signature help either.

@Saghen Saghen added the signature Related to the signature help label Jan 22, 2025
@Saghen Saghen closed this as completed in 6da1023 Jan 22, 2025
@Saghen
Copy link
Owner

Saghen commented Jan 22, 2025

I've wired up show_on_keyword, show_on_insert, and show_on_trigger_character under signature.trigger. You can also open it manually with require('blink.cmp').show_signature()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request signature Related to the signature help trigger Module which decides when to show windows
Projects
None yet
Development

No branches or pull requests

3 participants