> Maybe I didn't explain this correctly... I would expect the flow to be
> 
> - User hits <C-X><C- O or U>
> - vim executes foo#bar#FindCompletionStart instead of
>   CompletionFunction(1, '...')
>   The starting column of the completion is returned.
> - vim executes foo#bar#FindCompletions('...') instead of
>   CompletionFunction(0, '...')
>   The FULL list of completions is retuned, but in this case the 'info'
>   attribute of the contained dictionaries is empty (since they would
>   be lazily retrieved later, only when needed)
> - User stops on a completion for a determined amount of time
>   - vim then executes foo#bar#FindCompletionInfo(index), where index
>     is the index of completion the user paused on.
>   - vim displays the that info in the preview window

I really like the idea, it would enable both types of 'info' items. If
you can generate 'info' items quickly (like for the C-omnifunc), you can
generate them in the FindCompletions function and store them in an array
and just return the index of this array in the FindCompletionInfo
function.

But for languages where this info could take a lot of time to generate
(like extracting info from man pages, perldoc, or manually from doxygen
comments), you have the time to postpone this time consuming task.

But 1.5 seconds is much too long for a default wait time. Half a second
should be enough IMHO.

--
Martin

Reply via email to