-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
complete: show identifier information after completion is done #685
Conversation
This is a new feature that prints the information of the completed identifier in statusline. This is experimental closes #663
This is exactly what I'm looking for, but it seems to be a bit glitchy at the moment. I generally use tab to select a match, then I type the opening parenthesis to close the autocomplete list. If I do that, the function signature does not show up. How are you triggering the autocomplete of "" and the opening/closing parentheses? Also, I had to set noshowmode to hide the overlapping mode status. Powerline shows it anyway. |
@kodek push a better approach. Now it's much more efficient and should just work out of the box. Can you please test and return me your thoughts ? |
Not working at all right now :( Let me know if there's anything you'd like me to test. |
Is it also bound on a command (e.g. GoSignature) or is it only on auto-complete ? Anyway, great feature! |
@remeh it's all automatically. It works perfect for me and actually all I do is echoing the current completion from the cache. There is no magic, but the statusline is a place that many other plugins, sub systems of vim uses. So even though I display it, it might be overwritten meanwhile by something else. So it's tricky :) |
@@ -129,6 +142,10 @@ augroup vim-go | |||
autocmd CursorHold *.go nested call go#complete#Info() | |||
endif | |||
|
|||
" Echo the identifier information when completion is done. Useful to see | |||
" the signature of a function, etc... | |||
autocmd CompleteDone *.go nested call s:echo_go_info() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the check of CompleteDone is needed.
if exists('##CompleteDone')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah definitely @Shougo 👍 Should it not with one #
? Your example has two ##
. If yes why it is that way ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
##event
is the check of the event is supported.
From :help exists()
:
##event autocommand for this event is
supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, thanks! Fixed now.
I think my issue is related to a YCM conflict. I just realized I might be using the wrong autocomplete engine. Trying to fix, but I'll report back. Sorry! |
complete: show identifier information after completion is done
@kodek i'm also using YCM and i must have the info beeing overwritten so if you find the reason please share 👍 |
Btw, I have been searching for this fix/feature for months! Man, was it buried down deep in the Closed issues. This should be on the Homepage as a feature! Now, onto the issue... I can't seem to get this to work. Vim acts normally:
On this revision:
Tried a few random things:
For testing, I closed VIM each time and attempted reopen and edit a known .go file with known local func()s as well as accessing some of the standard library packages ( Nada. One thing to note: EDIT: I noticed that if I insert this into my
I have vim-sensible setup the defaults for my .vimrc; so, perhaps it has ^- while that has been fixed, I still do not get the auto-completion of the "" when selecting |
This is a new feature that prints the information of the completed identifier in statusline. This is experimental.
closes #663