[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/corfu 2f5e15add5: README: Add alternatives section
From: |
ELPA Syncer |
Subject: |
[elpa] externals/corfu 2f5e15add5: README: Add alternatives section |
Date: |
Fri, 31 Dec 2021 10:57:22 -0500 (EST) |
branch: externals/corfu
commit 2f5e15add5e1fdd20ff83d647e460cd8f85327a5
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
README: Add alternatives section
---
README.org | 54 ++++++++++++++++++++++++++++++++++++++++++------------
1 file changed, 42 insertions(+), 12 deletions(-)
diff --git a/README.org b/README.org
index 06d173e069..a890cbff31 100644
--- a/README.org
+++ b/README.org
@@ -17,22 +17,19 @@
Corfu is the minimalistic ~completion-in-region~ counterpart of the
[[https://github.com/minad/vertico][Vertico]]
minibuffer UI.
- Corfu is a minimal package, which relies on the Emacs completion facilities
and
- concentrates on providing a polished completion UI. Completions are either
+ Corfu is a minimal package, which relies on the Emacs completion facilities
+ and concentrates on providing a polished completion UI. Completions are
either
provided by commands like ~dabbrev-completion~ or by pluggable backends
(~completion-at-point-functions~, Capfs). Most programming language major
modes
- implement a Capf. Furthermore the language server packages,
[[https://github.com/joaotavora/eglot][Eglot]] and
[[https://github.com/emacs-lsp/lsp-mode][Lsp-mode]],
- both use Capfs which talk to the LSP server to retrieve the completions.
-
- Corfu does not include custom completion backends. In contrast, the complex
- Company package includes custom completion backends, which deviate from the
- Emacs completion infrastructure. The Emacs built-in Capfs are mostly
- sufficient, but a few additional Capfs and completion functions are provided
- by the [[https://github.com/minad/cape][Cape]] package.
+ implement a Capf. Furthermore the language server packages,
[[https://github.com/joaotavora/eglot][Eglot]] and
+ [[https://github.com/emacs-lsp/lsp-mode][Lsp-mode]], use Capfs which talk to
the LSP server to retrieve the completions.
+ Corfu does not include its own completion backends. The Emacs built-in Capfs
+ and the Capfs provided by other packages are usually sufficient, but a few
+ additional Capfs and completion functions are provided by the
[[https://github.com/minad/cape][Cape]] package.
*NOTE*: Corfu uses child frames to show the popup. For now Corfu falls back
to
the default setting of the ~completion-in-region-function~ on non-graphical
- displays. You may want to use ~consult-completion-in-region~.
+ displays.
[[https://github.com/minad/corfu/blob/screenshots/light.png?raw=true]]
@@ -210,13 +207,46 @@ moves to the next candidate and further input will then
commit the selection.
- [[https://github.com/minad/vertico][Vertico]]: You may also want to look
into my [[https://github.com/minad/vertico][Vertico]] package. Vertico is the
minibuffer completion counterpart of Corfu.
+* Alternatives
+
+ - [[https://github.com/company-mode/company-mode][Company]]: Company is a
widely used and mature completion package, which
+ implements a similar interaction model and popup UI as Corfu. While Corfu
+ relies exclusively on the standard Emacs completion API (Capfs), Company
+ defines its own API for the backends. Furthermore Company includes its
+ completion backends, which are incompatible with the Emacs completion
+ infrastructure. As a result of this design, Company is a more complex
+ package than Corfu. Company by default uses overlays to display the popup
in
+ contrast to the child frames used by Corfu. Overall both packages work
well.
+ Company is more mature but the integration into Emacs is a bit less tight,
+ since for example the ~completion-at-point~ command (or the
+ ~completion-in-region~ function) does not invoke Company.
+
+ - [[https://gitlab.com/protesilaos/mct][Mct]]: Protesilaos' Minibuffer
Confines Transcended package supports both
+ minibuffer completion and completion in region. It reuses the default
+ completion UI for this purpose and installs a timer which live updates the
+ completion buffer. The main advantage of Mct is that you work with a
regular
+ Emacs buffer instead of with a popup. You can take advantage of the usual
+ Emacs commands to navigate in the completions buffer. On top, Mct enhances
+ the movement such that you can quickly switch between the completions
buffer
+ and the minibuffer or the region which is being completed. Mct does not
+ support timer-based auto completion, but the integration into Emacs is
+ naturally tight.
+
+ - [[https://github.com/minad/consult][consult-completion-in-region]]: The
Consult package provides the function
+ ~consult-completion-in-region~ which can be set as
+ ~completion-in-region-function~ such that it handles
~completion-at-point~. The
+ function works by transferring the in-buffer completion to the minibuffer.
+ In the minibuffer, the minibuffer completion UI, for example
[[https://github.com/minad/vertico][Vertico]] takes
+ over. If you prefer to perform all your completions in the minibuffer
+ ~consult-completion-in-region~ is your best option.
+
* Caveats
Corfu is robust in most scenarios. There are a few known technical caveats.
- Corfu uses child frames to show the popup. For now Corfu falls back to the
default setting of the ~completion-in-region-function~ on non-graphical
- displays. You may want to use ~consult-completion-in-region~.
+ displays. You can use one of the alternatives in terminals.
- Corfu does not sort by history, since ~completion-at-point~ does not
maintain a history (See branch =history= for a possible solution).
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/corfu 2f5e15add5: README: Add alternatives section,
ELPA Syncer <=