[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Inline completion preview
From: |
Eshel Yaron |
Subject: |
Re: Inline completion preview |
Date: |
Wed, 01 Nov 2023 13:17:20 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
João Távora <joaotavora@gmail.com> writes:
> 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.
Thanks, I've implemented your suggestion and it seems to work nicely.
See the updated code at
https://git.sr.ht/~eshel/completion-preview/tree/master/item/completion-preview.el
>> ...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).
I fully agree we should focus on the capf backend.
I guess I'll wait for further opinions regarding adding either (some of)
Company or `completion-preview` to core, otherwise I can start preparing
a patch for adding `completion-preview` that'd include some additional
documentation etc.
Cheers,
Eshel
Re: Inline completion preview, Dmitry Gutov, 2023/11/01