Youcompleteme: Show preview in airline

Created on 30 Aug 2016  路  15Comments  路  Source: ycm-core/YouCompleteMe

Hi, is there a way to show the preview buffer in between the airline?
For example, something like:

Most helpful comment

FWIW i've been playing with something today which shows the current function signature (or, strictly _a_ possible function signature - ignoring overloads for now) in the command line:

ycm-show-function-sig

It could work, and it is based on the work @oblitum did in clang to produce OverloadCandidate completion suggestions. I might keep working this to see if it can be generalised without a vim feature, but i'm pretty convinced that there is no way to make this work _properly_ in vim without some additional vim support for popups or whatever.

All 15 comments

No, there isn't. At least not currently.

There are some challenges involved, such as overloads, etc (i.e. which overload to display)

Related to #2248

Ok, thank you for your answer.

Then, is there a way to not let vim move the main window text, when opening the preview window?
When the preview window get's opened, the main window text gets moved away.
For example if the preview is on top and uses 3 lines of text, the whole content of the main window moves 3 lines down.

It would be nice if the preview window would "hover" over the main window.

That would be a question for vim_dev. The preview window is a Vim feature.

Ok thank you.

FWIW i've been playing with something today which shows the current function signature (or, strictly _a_ possible function signature - ignoring overloads for now) in the command line:

ycm-show-function-sig

It could work, and it is based on the work @oblitum did in clang to produce OverloadCandidate completion suggestions. I might keep working this to see if it can be generalised without a vim feature, but i'm pretty convinced that there is no way to make this work _properly_ in vim without some additional vim support for popups or whatever.

Wow, this would be really great.
I really appreciate your helpfulness.
Thank you a lot :).

One question, how did you do this vim styling, I mean for example this slim split line at the left?
Or is this an program you are using?

@puremourning nice work! :-)

@puremourning I'm curious, it seems your arguments hints are showing up solely at forced completion. Is it on purpose or the automatic popup didn't work for you?

I'm curious, it seems your arguments hints are showing up solely at forced completion.

I'm just guessing since it's being slow to show up (maybe it's slow on purpose to better illustrate).

Ah. I'm also guessing the hints are based on my fork but they may be just your own new implementation.

It's a separate implementation based on you libclang changes (not YCM fork). It is forced completion because of that (not triggering on white space)

I want to change it to trigger on ( and , instead.

@DasOhmoff I used solarized vim plugin, airline and a few other things. My .vim is in my repo.

I actually had a better ide for displaying this. Would require a vim change, but might be worth it.

Oh wait the split thing is actually just iterm2. I use tmux in Linux and iterm2 on Mac.

ld require a vim change, but might be worth it.

You mean a change in vim itself?

Was this page helpful?
0 / 5 - 0 ratings