emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inline completion preview


From: João Távora
Subject: Re: Inline completion preview
Date: Wed, 1 Nov 2023 11:07:21 +0000

On Wed, Nov 1, 2023 at 10:44 AM Eshel Yaron <me@eshelyaron.com> wrote:

> > But OTOH there are other better ways to do that, i.e. via
> > completion-at-point-functions.   Are you sure your completion frontend
> > can't work via those?  The function you add to that variable could
> > just endeavour to check if there's any preview showing as an overlay,
> > and it if is insert it.  Then you would need no rebinding.
>
> Yes, that could be quite a nice solution.  I'll try working it in and
> see how it goes.  Thanks for this suggestion.

Glad it helps.  If you do this and it works out, then I think it's a good
addition to core Emacs.  Not as great as a fully fledged completion tooltip
but nice nonetheless.

> > Also are you 100% sure Company doesn't do this?  I'm pretty sure
> > it does this when there is only one completion, at least.
>
> No, I'm sure Company does do more or less this.  As you say, and as I
> mentioned upthread, Company provides a preview frontend that kicks in
> when there's just one completion candidate by default.  (This is in
> contrast with `corfu`, that provides no such preview.)  There are some
> differences between my implementation and what you get with Company's
> preview frontend, but if Company would make it to core Emacs that would
> indeed mostly obviate the need for my `completion-preview`, at least as
> far as I'm concerned.  Is there a viable path for upstreaming Company?

I've suggested this in the past, and it's mostly for Dmitry to answer,
but IMO that path should definitely contain a scaling back of Company's
company-backends infrastructure, basically importing only company-capf,
which is (IME of course) the only real backend we should focus on. This
would help sanitize some of the incorrect perceptions of complexity in
Company setup (the kind that Alex's argument suffers from).

João



reply via email to

[Prev in Thread] Current Thread [Next in Thread]