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

Show function signature when filling its arguments #663

Closed
nothingelsematters7 opened this issue Dec 20, 2015 · 6 comments · Fixed by #685
Closed

Show function signature when filling its arguments #663

nothingelsematters7 opened this issue Dec 20, 2015 · 6 comments · Fixed by #685

Comments

@nothingelsematters7
Copy link

I like :GoInfo feature for functions using which I can view function arguments order with their types.

But when typed function name someFunction( with opening ( I cannot view arguments anymore without returning in Normal-mode and going to function name.

I would be great to have an option to see :GoInfo for used function when filling its argument list.

@kodek
Copy link

kodek commented Dec 30, 2015

👍 I'd also love to see function signatures while in insert mode.

@shazow
Copy link
Contributor

shazow commented Jan 2, 2016

I think there's a way to do this using a preview window but that's not ideal. I've tried to get the completion hover to keep the signature while filling it out, but can't figure out the right approach to do that (my vimscript-fu is weak).

Alternatively, another solution might be to have a binding that fills out the signature as a snippet. That way it will appear inline as a reference but also remain overrideable and let you jump between fields to fill them in.

fatih added a commit that referenced this issue Jan 16, 2016
This is a new feature that prints the information of the completed
identifier in statusline. This is experimental

closes #663
@fatih
Copy link
Owner

fatih commented Jan 16, 2016

Hi everyone. Can you please try #685? It's far from perfect but at least it's helpful :) I'm thinking to add some docs and putting it behind a flag (maybe). Here is a sneak peak of it:

@Ch00k
Copy link

Ch00k commented Feb 20, 2018

Is there a switch that I could use to disable this feature?

@jackielii
Copy link

jackielii commented Mar 16, 2019

https://github.com/Shougo/echodoc.vim

this plugin seems to work well, however I had to do set cmdheight=2

@alwindoss
Copy link

@fatih this works perfectly for times when functions are simpler.
in cases like binary.Write, let's say I have used this to type until binary.Write(buff, binary.B at this point in an attempt to check what is available in encoding/binary package I press C-x C-o and then the function info displayed at the bottom disappears.
How do I make it appear again and make it stay?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants