francisco.lopes added a comment.

In https://reviews.llvm.org/D38048#889176, @ilya-biryukov wrote:

> @francisco.lopes, thanks for sharing your experience, I definitely like the 
> final UX you achieved, we should aim for something similar in clangd.
>  It also looks like @rwols's  idea of how things should look like is very 
> close to your implementation.


Nice!

> I do think that showing signatures for non-overloaded functions in completion 
> may still be useful. Overloaded functions can be grouped by name and include 
> some indicators that there are more overloads (something like `foo(int)   
> void  (+5 overloads)`.
>  How do you choose return type for the completion item if function is 
> overloaded? Show it only when it's the same for all overloads? Go with one of 
> the return types?

In fact it didn't happen to me to think about the return information in the 
popup menu at the time, so it was not changed!, and it should just show one 
return type from one of the overloads randomly (I must never look at return 
types...).
I do think the (+ 5 overloads) approach is a good one too, though I prefer to 
not oversize the menu width with parameters.

It will be cool if clangd and its Language Server Protocol implementation 
manages to have feature parity with this, personally I'd be looking in 
migrating from YouCompleteMe to a LSP solution that's more modular and 
lightweight, possibly bringing to it
what gets implemented here myself.


https://reviews.llvm.org/D38048



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to