emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#66948: closed ([PATCH] Add Completion Preview mode)


From: GNU bug Tracking System
Subject: bug#66948: closed ([PATCH] Add Completion Preview mode)
Date: Wed, 15 Nov 2023 17:19:02 +0000

Your message dated Wed, 15 Nov 2023 19:17:59 +0200
with message-id <83bkbvq6k8.fsf@gnu.org>
and subject line Re: bug#66948: [PATCH] Add Completion Preview mode
has caused the debbugs.gnu.org bug report #66948,
regarding [PATCH] Add Completion Preview mode
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
66948: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66948
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] Add Completion Preview mode Date: Sun, 05 Nov 2023 11:26:07 +0100
Tags: patch

Following the recent discussion on emacs-devel[0], I'm attaching a patch
that adds a new Completion Preview minor mode.

I've been testing this patch with different completion backends, and so
far I'm pretty happy with the results.  I've made some tweaks compared
to the version I posted on emacs-devel to make the implementation more
robust, and in particular to accommodate for some peculiarities of
LSP-based completion, which I've tested mostly with `eglot` but also
with `lsp-mode`.

In terms of documentation, this patch extends "(emacs)Symbol Completion"
with a description of Completion Preview mode.  That seemed like a good
place to discuss this mode, but let me know if somewhere else would be
preferable.

Another question is whether to have RET/TAB/both accept and insert the
completion suggestion.  In VS Code, both RET and TAB do that AFAICT.  If
we want to, we can easily do that too by binding RET/TAB in
`completion-preview-active-mode-map`.  Alternatively, we can just
suggest doing so in the documentation.  The current patch binds neither
RET nor TAB, so to accept the suggestion you complete with C-M-i.
Personally, I find that convenient enough, but I can imagine that many
users might expect TAB or RET to work too.

[0] https://lists.gnu.org/archive/html/emacs-devel/2023-10/msg00693.html

Attachment: 0001-Add-Completion-Preview-mode.patch
Description: Text Data


--- End Message ---
--- Begin Message --- Subject: Re: bug#66948: [PATCH] Add Completion Preview mode Date: Wed, 15 Nov 2023 19:17:59 +0200
> From: Eshel Yaron <me@eshelyaron.com>
> Cc: philipk@posteo.net,  juri@linkov.net,  dmitry@gutov.dev,
>   stefankangas@gmail.com,  66948@debbugs.gnu.org,  joaotavora@gmail.com
> Date: Wed, 15 Nov 2023 15:22:25 +0100
> 
> > How about some color (foreground or background)?
> 
> Sure, I've added a fallback that uses `:weight bold` when that's
> supported but `:underline` isn't, and another ultimate fallback that
> uses a background color instead.  Here's the updated patch (v6):

Thanks, installed on master, and closing the bug.


--- End Message ---

reply via email to

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