all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Inline completion preview
@ 2023-10-26 18:11 Eshel Yaron
  2023-10-26 18:38 ` Eli Zaretskii
  0 siblings, 1 reply; 51+ messages in thread
From: Eshel Yaron @ 2023-10-26 18:11 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1883 bytes --]

Hi,

I want to propose adding an inline completion preview mechanism to Emacs.

By inline completion preview, I mean an overlay that pop ups after point
showing one of the candidates for at-point completion.  You can view
this mechanism as giving you a hint or suggesting a certain completion.

Of course, there are a few Emacs packages that provide such a facility
already.  Namely, I found and played around with the following packages:

- `company` includes three variants of such a preview frontend, one of
  them enabled by default, that show a completion candidate provided by
  `company`'s backends.  See [0].
- `fancy-dabbrev` does something similar for `dabbrev` abbreviations.
  See [1].
- `mono-complete` provides such a completion preview frontend with
  several pluggable backends, including `completion-at-point` and
  `dabbrev`.  See [2].
- `corfu-candidate-overlay` implements such a preview for
  `completion-at-point` candidates that relies on the `corfu` in-buffer
  completion interface.  See [3].

IIUC similar features exist in other editors and go by names such as
"suggestion preview" and "ghost text".

I like this completion preview concept and I think it may be interesting
for Emacs to provide it.  ISTM that the best approach is a simple
library that uses only `completion-at-point` as a backend, because
`completion-at-point` is already extensible enough to support a variety
of completion backends.

I'm attaching below a draft for a simple `completion-preview.el` for
your consideration, I've been testing it in several major modes with
different `completion-at-point` backends, including LSP-based.

WDYT?


Eshel

[0] http://company-mode.github.io/manual/Frontends.html#Preview-Frontends
[1] https://github.com/jrosdahl/fancy-dabbrev
[2] https://codeberg.org/ideasman42/emacs-mono-complete
[3] https://code.bsdgeek.org/adam/corfu-candidate-overlay


[-- Attachment #2: completion-preview.el --]
[-- Type: application/emacs-lisp, Size: 7360 bytes --]

^ permalink raw reply	[flat|nested] 51+ messages in thread

end of thread, other threads:[~2023-11-01 19:57 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-26 18:11 Inline completion preview Eshel Yaron
2023-10-26 18:38 ` Eli Zaretskii
2023-10-26 19:39   ` Eshel Yaron
2023-10-27  5:52     ` Eli Zaretskii
2023-10-27 15:43       ` Eshel Yaron
2023-10-27 17:12         ` Eli Zaretskii
2023-10-27 18:13           ` Eshel Yaron
2023-10-27 20:25             ` chad
2023-10-28 16:47         ` Juri Linkov
2023-10-28 19:01           ` Eshel Yaron
2023-10-29 16:24             ` Alexander Adolf
2023-10-29 23:29               ` João Távora
2023-10-30  9:25                 ` Juergen Fenn
2023-10-30  9:36                   ` João Távora
2023-10-30 11:04                     ` Dmitry Gutov
2023-10-30 12:42                 ` Alexander Adolf
2023-10-30 13:01                   ` João Távora
2023-10-30 17:32                     ` Alexander Adolf
2023-10-30 17:52                       ` João Távora
2023-10-30 13:20                   ` Dmitry Gutov
2023-10-30 17:43                     ` Alexander Adolf
2023-10-30 22:49                       ` Dmitry Gutov
2023-10-31  6:50                         ` Eshel Yaron
2023-10-31 17:31                           ` Alexander Adolf
2023-10-31 17:43                             ` Eshel Yaron
2023-10-31 23:29                           ` Dmitry Gutov
2023-11-01  8:30                             ` Eshel Yaron
2023-11-01 10:11                               ` João Távora
2023-11-01 10:44                                 ` Eshel Yaron
2023-11-01 11:07                                   ` João Távora
2023-11-01 12:17                                     ` Eshel Yaron
2023-11-01 12:23                                     ` Dmitry Gutov
2023-11-01 14:07                                       ` Juergen Fenn
2023-11-01 19:57                                         ` Dmitry Gutov
2023-11-01 12:08                                   ` Dmitry Gutov
2023-11-01 12:14                               ` Dmitry Gutov
2023-11-01 12:24                                 ` Dmitry Gutov
2023-11-01 12:29                                 ` Eshel Yaron
2023-11-01 12:32                                   ` Dmitry Gutov
2023-11-01 12:34                                 ` Eli Zaretskii
2023-11-01 12:36                                   ` Dmitry Gutov
2023-11-01 13:28                         ` Po Lu
2023-11-01 19:49                           ` Dmitry Gutov
2023-10-27  8:58     ` Ihor Radchenko
2023-10-27 15:53       ` Eshel Yaron
2023-10-27 11:49   ` João Távora
2023-10-27 11:52     ` João Távora
2023-10-27 12:18     ` Eli Zaretskii
2023-10-27 12:55       ` João Távora
2023-10-27 12:58         ` Eli Zaretskii
2023-10-27 13:05     ` Dmitry Gutov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.