-
Notifications
You must be signed in to change notification settings - Fork 28
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
[BUG] Signature hint window disappears in insert mode #238
Comments
For me signature hints only pop up with
|
@daveriedstra Thanks for the report. I can reproduce the behaviour you are describing (no signature shown while triggering the mapping in insert mode), I'll take a look. @salkin-mada The float window opens automatically for me when typing the opening paren, perhaps there is some sort of conflict with another plugin and or mapping that causes the issue you are describing? In case someone stumbles upon this issue in the future while searching, I would just like to share this specific configuration option that changes the "close" behaviour of the signature pop-up. You will find all possible configuration options in this help file: local scnvim = require('scnvim')
scnvim.setup {
editor = {
signature = {
config = {
-- Keep the signature visible until exiting insert mode, or if cursor moves in normal mode
close_events = {'InsertLeave', 'CursorMoved'},
},
},
}
} |
@davidgranstrom thanks for the config example, that's very helpful and probably what I'll end up using with some tweaks. Is there a way to manually close the signature window? I haven't been able to find a |
Currently there is no such function, but it should be possible to save the |
Thanks for the push to write this little PR, @davidgranstrom! I noticed in another issue that some features relating to syntax could be rewritten to integrate upcoming supercollider LSP. Is that also the case here? Maybe it's worth waiting for that? |
Thanks <3 soo nice to have it sticking until I leave insertmode. Håhåhå you wont believe it, I dont. So in my config I was not setting the Nevermind.. too esoteric. But I am wondering why is the default of signature/config/close_events not InsertLeave and CursorMoved? |
I have not been able to find this because I have been searching the |
I've made that mistake before too, with scnvim and other plugins. Easy to get lost in levels of nesting.
I'm also curious, I find the default behaviour unintuitive. The signature hint disappears right when I need it. My guess is that it's because there's no event to hook into for reaching the end of the argument list in insert mode, and without one, the hint remains for any time spent in insert mode after the user finishes writing the argument list.
I don't think so. FWIW and for future visitors, the |
Describe the bug
When inserting function parameters, the signature hint window appears after the initial open paren, then disappears while typing. Additionally, invoking
signature.show
while in insert mode often does not trigger the signature window. This seems to be related to other content in the parens and whether the closing paren is present.Expected behavior
The signature hint window should show in insert mode according to the default config, and also when triggered.
Steps to reproduce
.scd
file and start scnvimLPF.ar(|
(where|
is the cursor)LPF.ar(something)|
<ESC>
then enter insert mode withci(
, resulting inLPF.ar(|)
signature.show
(with a keybind,<C-k>
using the below vimrc)Additional context
This can be reproduced using this minimal config (eg, with
nvim -u testconfig.vimrc
, using vim-plug):Sorry for the long explanation, this one got slipperier the more I investigated. It has always been this way on my system, so it's not a new thing, I only just got around to trying to fix it...
Information
Operating system
Pop!_OS 22.04
SuperCollider version
3.11.12
nvim --version
vim-plug
The text was updated successfully, but these errors were encountered: