corfu.info (28867B)
1 This is corfu.info, produced by makeinfo version 6.7 from corfu.texi. 2 3 INFO-DIR-SECTION Emacs misc features 4 START-INFO-DIR-ENTRY 5 * Corfu: (corfu). Completion Overlay Region FUnction. 6 END-INFO-DIR-ENTRY 7 8 9 File: corfu.info, Node: Top, Next: Introduction, Up: (dir) 10 11 corfu.el - Completion Overlay Region FUnction 12 ********************************************* 13 14 * Menu: 15 16 * Introduction:: 17 * Features:: 18 * Installation and Configuration:: 19 * Key bindings:: 20 * Extensions:: 21 * Complementary packages:: 22 * Alternatives:: 23 * Contributions:: 24 25 — The Detailed Node Listing — 26 27 Installation and Configuration 28 29 * Auto completion:: 30 * Completing with Corfu in the minibuffer:: 31 * Completing with Corfu in the Eshell or Shell:: 32 * Orderless completion:: 33 * TAB-and-Go completion:: 34 * Transfer completion to the minibuffer:: 35 36 37 38 File: corfu.info, Node: Introduction, Next: Features, Prev: Top, Up: Top 39 40 1 Introduction 41 ************** 42 43 Corfu enhances completion at point with a small completion popup. The 44 current candidates are shown in a popup below or above the point. Corfu 45 is the minimalistic ‘completion-in-region’ counterpart of the Vertico 46 (https://github.com/minad/vertico) minibuffer UI. 47 48 Corfu is a small package, which relies on the Emacs completion 49 facilities and concentrates on providing a polished completion UI. 50 Completions are either provided by commands like ‘dabbrev-completion’ or 51 by pluggable backends (‘completion-at-point-functions’, Capfs). Most 52 programming language major modes implement a Capf. Furthermore the 53 language server packages, Eglot (https://github.com/joaotavora/eglot) 54 and Lsp-mode (https://github.com/emacs-lsp/lsp-mode), use Capfs which 55 talk to the LSP server to retrieve the completions. Corfu does not 56 include its own completion backends. The Emacs built-in Capfs and the 57 Capfs provided by other programming language packages are usually 58 sufficient. A few additional Capfs and completion utilities are 59 provided by the Cape (https://github.com/minad/cape) package. 60 61 *NOTE*: Corfu uses child frames to show the popup and falls back to 62 the default setting of the ‘completion-in-region-function’ on 63 non-graphical displays. There is a package in the works 64 (https://codeberg.org/akib/emacs-corfu-popup) which uses overlays for 65 the popup such that Corfu can be used when Emacs is running in a 66 terminal. 67 68 <https://github.com/minad/corfu/blob/screenshots/light.png?raw=true> 69 70 <https://github.com/minad/corfu/blob/screenshots/dark.png?raw=true> 71 72 73 File: corfu.info, Node: Features, Next: Installation and Configuration, Prev: Introduction, Up: Top 74 75 2 Features 76 ********** 77 78 • Timer-based auto-completions (_off_ by default, set ‘corfu-auto’). 79 • Popup display with scrollbar indicator and arrow key navigation. 80 • The popup can be summoned explicitly by pressing ‘TAB’ at any time. 81 • The current candidate is inserted with ‘TAB’ and selected with 82 ‘RET’. 83 • Candidates sorting by prefix, string length and alphabetically. 84 • The selected candidate is previewed (configurable via 85 ‘corfu-preview-current’). 86 • The selected candidate automatically committed on further input by 87 default. (configurable via ‘corfu-preview-current’). 88 • The Orderless (https://github.com/oantolin/orderless) completion 89 style is supported. The filter string can contain arbitrary 90 characters, after inserting a space via ‘M-SPC’ (configurable via 91 ‘corfu-quit-at-boundary’ and ‘corfu-separator’). 92 • Deferred completion style highlighting for performance. 93 • Support for candidate annotations and documentation in the echo 94 area. 95 • Deprecated candidates are crossed out in the display. 96 • Icons can be provided by an external package via margin formatter 97 functions. 98 • Extensions: Quick keys, Index keys, Sorting by history, Candidate 99 documentation 100 101 102 File: corfu.info, Node: Installation and Configuration, Next: Key bindings, Prev: Features, Up: Top 103 104 3 Installation and Configuration 105 ******************************** 106 107 Corfu is available from GNU ELPA 108 (http://elpa.gnu.org/packages/corfu.html), such that it can be installed 109 directly via ‘package-install’. After installation, the global minor 110 mode can be enabled with ‘M-x global-corfu-mode’. In order to configure 111 Corfu and other packages in your init.el, you may want to use 112 ‘use-package’. 113 114 Corfu is highly flexible and customizable via ‘corfu-*’ customization 115 variables, such that you can adapt it precisely to your requirements. 116 However in order to quickly try out the Corfu completion package, it 117 should be sufficient to activate ‘global-corfu-mode’. You can 118 experiment with manual completion for example in an Elisp buffer or in 119 an Eshell or Shell buffer. For auto completion, set ‘corfu-auto=t’ 120 before turning on ‘global-corfu-mode’. 121 122 Here is an example configuration: 123 124 (use-package corfu 125 ;; Optional customizations 126 ;; :custom 127 ;; (corfu-cycle t) ;; Enable cycling for `corfu-next/previous' 128 ;; (corfu-auto t) ;; Enable auto completion 129 ;; (corfu-separator ?\s) ;; Orderless field separator 130 ;; (corfu-quit-at-boundary nil) ;; Never quit at completion boundary 131 ;; (corfu-quit-no-match nil) ;; Never quit, even if there is no match 132 ;; (corfu-preview-current nil) ;; Disable current candidate preview 133 ;; (corfu-preselect-first nil) ;; Disable candidate preselection 134 ;; (corfu-on-exact-match nil) ;; Configure handling of exact matches 135 ;; (corfu-echo-documentation nil) ;; Disable documentation in the echo area 136 ;; (corfu-scroll-margin 5) ;; Use scroll margin 137 138 ;; Enable Corfu only for certain modes. 139 ;; :hook ((prog-mode . corfu-mode) 140 ;; (shell-mode . corfu-mode) 141 ;; (eshell-mode . corfu-mode)) 142 143 ;; Recommended: Enable Corfu globally. 144 ;; This is recommended since Dabbrev can be used globally (M-/). 145 ;; See also `corfu-excluded-modes'. 146 :init 147 (global-corfu-mode)) 148 149 ;; A few more useful configurations... 150 (use-package emacs 151 :init 152 ;; TAB cycle if there are only few candidates 153 (setq completion-cycle-threshold 3) 154 155 ;; Emacs 28: Hide commands in M-x which do not apply to the current mode. 156 ;; Corfu commands are hidden, since they are not supposed to be used via M-x. 157 ;; (setq read-extended-command-predicate 158 ;; #'command-completion-default-include-p) 159 160 ;; Enable indentation+completion using the TAB key. 161 ;; `completion-at-point' is often bound to M-TAB. 162 (setq tab-always-indent 'complete)) 163 164 Dabbrev completion is based on ‘completion-in-region’ and can be used 165 with Corfu. You may want to swap the ‘dabbrev-completion’ with the 166 ‘dabbrev-expand’ key for easier access, if you prefer completion. Also 167 take a look at the ‘cape-dabbrev’ completion at point function provided 168 by my Cape (https://github.com/minad/cape) package. 169 170 ;; Use Dabbrev with Corfu! 171 (use-package dabbrev 172 ;; Swap M-/ and C-M-/ 173 :bind (("M-/" . dabbrev-completion) 174 ("C-M-/" . dabbrev-expand)) 175 ;; Other useful Dabbrev configurations. 176 :custom 177 (dabbrev-ignored-buffer-regexps '("\\.\\(?:pdf\\|jpe?g\\|png\\)\\'"))) 178 179 If you start to configure the package more deeply, I recommend to 180 give the Orderless completion style a try for filtering. Orderless 181 completion is different from the familiar prefix TAB completion. Corfu 182 can be used with the default completion styles. The use of Orderless is 183 not a necessity. 184 185 ;; Optionally use the `orderless' completion style. 186 (use-package orderless 187 :init 188 ;; Configure a custom style dispatcher (see the Consult wiki) 189 ;; (setq orderless-style-dispatchers '(+orderless-dispatch) 190 ;; orderless-component-separator #'orderless-escapable-split-on-space) 191 (setq completion-styles '(orderless basic) 192 completion-category-defaults nil 193 completion-category-overrides '((file (styles . (partial-completion)))))) 194 195 The ‘basic’ completion style is specified as fallback in addition to 196 ‘orderless’ in order to ensure that completion commands which rely on 197 dynamic completion tables, e.g., ‘completion-table-dynamic’ or 198 ‘completion-table-in-turn’, work correctly. See ‘+orderless-dispatch’ 199 in the Consult wiki (https://github.com/minad/consult/wiki) for an 200 advanced Orderless style dispatcher. Additionally enable 201 ‘partial-completion’ for file path expansion. ‘partial-completion’ is 202 important for file wildcard support. Multiple files can be opened at 203 once with ‘find-file’ if you enter a wildcard. You may also give the 204 ‘initials’ completion style a try. 205 206 See also the Corfu Wiki (https://github.com/minad/corfu/wiki) for 207 additional configuration tips. In particular the Lsp-mode configuration 208 is documented in the wiki. For more general documentation read the 209 chapter about completion in the Emacs manual 210 (https://www.gnu.org/software/emacs/manual/html_node/emacs/Completion.html). 211 If you want to create your own Capfs, you can find documentation about 212 completion in the Elisp manual 213 (https://www.gnu.org/software/emacs/manual/html_node/elisp/Completion.html). 214 215 * Menu: 216 217 * Auto completion:: 218 * Completing with Corfu in the minibuffer:: 219 * Completing with Corfu in the Eshell or Shell:: 220 * Orderless completion:: 221 * TAB-and-Go completion:: 222 * Transfer completion to the minibuffer:: 223 224 225 File: corfu.info, Node: Auto completion, Next: Completing with Corfu in the minibuffer, Up: Installation and Configuration 226 227 3.1 Auto completion 228 =================== 229 230 Auto completion is disabled by default, but can be enabled by setting 231 ‘corfu-auto=t’. Furthermore you may want to configure Corfu to quit 232 completion eagerly, such that the completion popup stays out of your way 233 when it appeared unexpectedly. 234 235 ;; Enable auto completion and configure quitting 236 (setq corfu-auto t 237 corfu-quit-no-match 'separator) ;; or t 238 239 In general, I recommend to experiment a bit with the various settings 240 and key bindings to find a configuration which works for you. There is 241 no one size fits all solution. Some people like auto completion, some 242 like manual completion, some want to cycle with TAB and some with the 243 arrow keys... 244 245 246 File: corfu.info, Node: Completing with Corfu in the minibuffer, Next: Completing with Corfu in the Eshell or Shell, Prev: Auto completion, Up: Installation and Configuration 247 248 3.2 Completing with Corfu in the minibuffer 249 =========================================== 250 251 Corfu can be used for completion in the minibuffer, since it relies on 252 child frames to display the candidates. By default, ‘global-corfu-mode’ 253 does not activate ‘corfu-mode’ in the minibuffer, to avoid interference 254 with specialised minibuffer completion UIs like Vertico or Mct. However 255 you may still want to enable Corfu completion for commands like ‘M-:’ 256 (‘eval-expression’) or ‘M-!’ (‘shell-command’), which read from the 257 minibuffer. Activate ‘corfu-mode’ only if ‘completion-at-point’ is 258 bound in the minibuffer-local keymap to achieve this effect. 259 260 (defun corfu-enable-in-minibuffer () 261 "Enable Corfu in the minibuffer if `completion-at-point' is bound." 262 (when (where-is-internal #'completion-at-point (list (current-local-map))) 263 ;; (setq-local corfu-auto nil) Enable/disable auto completion 264 (corfu-mode 1))) 265 (add-hook 'minibuffer-setup-hook #'corfu-enable-in-minibuffer) 266 267 You can also enable Corfu more generally for every minibuffer, as 268 long as no other completion UI is active. If you use Mct or Vertico as 269 your main minibuffer completion UI, the following snippet should yield 270 the desired result. 271 272 (defun corfu-enable-always-in-minibuffer () 273 "Enable Corfu in the minibuffer if Vertico/Mct are not active." 274 (unless (or (bound-and-true-p mct--active) 275 (bound-and-true-p vertico--input)) 276 ;; (setq-local corfu-auto nil) Enable/disable auto completion 277 (corfu-mode 1))) 278 (add-hook 'minibuffer-setup-hook #'corfu-enable-always-in-minibuffer 1) 279 280 281 File: corfu.info, Node: Completing with Corfu in the Eshell or Shell, Next: Orderless completion, Prev: Completing with Corfu in the minibuffer, Up: Installation and Configuration 282 283 3.3 Completing with Corfu in the Eshell or Shell 284 ================================================ 285 286 When completing in the Eshell I recommend conservative local settings 287 without auto completion, such that the completion behavior is similar to 288 widely used shells like Bash, Zsh or Fish. 289 290 (add-hook 'eshell-mode-hook 291 (lambda () 292 (setq-local corfu-auto nil) 293 (corfu-mode))) 294 295 When pressing ‘RET’ while the Corfu popup is visible, the 296 ‘corfu-insert’ command will be invoked. This command does inserts the 297 currently selected candidate, but it does not send the prompt input to 298 Eshell or the comint process. Therefore you often have to press ‘RET’ 299 twice which feels like an unnecessary double confirmation. Fortunately 300 it is easy to improve this! In my configuration I define the advice 301 ‘corfu-send-shell’ which sends the candidate after insertion. 302 303 (defun corfu-send-shell (&rest _) 304 "Send completion candidate when inside comint/eshell." 305 (cond 306 ((and (derived-mode-p 'eshell-mode) (fboundp 'eshell-send-input)) 307 (eshell-send-input)) 308 ((and (derived-mode-p 'comint-mode) (fboundp 'comint-send-input)) 309 (comint-send-input)))) 310 311 (advice-add #'corfu-insert :after #'corfu-send-shell) 312 313 Shell completion uses the flexible ‘pcomplete’ mechanism internally, 314 which allows you to program the completions per shell command. If you 315 want to know more, look into this blog post 316 (https://www.masteringemacs.org/article/pcomplete-context-sensitive-completion-emacs), 317 which shows how to configure pcomplete for git commands. I recommend 318 the pcmpl-args (https://github.com/JonWaltman/pcmpl-args.el) package 319 which extends Pcomplete with completion support and helpful annotation 320 support for more commands. Similar to the Fish shell, pcmpl-args uses 321 man page parsing and –help output parsing to dynamically generate 322 completions. This package brings Eshell completion to another level! 323 324 Unfortunately Pcomplete has a few technical issues, which we can work 325 around with the Cape (https://github.com/minad/cape) library (Completion 326 at point extensions). Cape provides wrappers, which sanitize the 327 pcomplete function. Ideally the bugs in pcomplete should be fixed 328 upstream. *For now these two advices are strongly recommended to 329 achieve a sane Eshell experience.* 330 331 ;; Silence the pcomplete capf, no errors or messages! 332 (advice-add 'pcomplete-completions-at-point :around #'cape-wrap-silent) 333 334 ;; Ensure that pcomplete does not write to the buffer 335 ;; and behaves as a pure `completion-at-point-function'. 336 (advice-add 'pcomplete-completions-at-point :around #'cape-wrap-purify) 337 338 339 File: corfu.info, Node: Orderless completion, Next: TAB-and-Go completion, Prev: Completing with Corfu in the Eshell or Shell, Up: Installation and Configuration 340 341 3.4 Orderless completion 342 ======================== 343 344 Orderless (https://github.com/oantolin/orderless) is an advanced 345 completion style that supports multi-component search filters separated 346 by a configurable character (space, by default). Normally, entering 347 characters like space which lie outside the completion region boundaries 348 (words, typically) causes Corfu to quit. This behavior is helpful with 349 auto-completion, which may pop-up when not desired, e.g. on entering a 350 new variable name. Just keep typing and Corfu will get out of the way. 351 352 But orderless search terms can contain arbitrary characters; they are 353 also interpreted as regular expressions. To use orderless, set 354 ‘corfu-separator’ (a space, by default) to the primary character of your 355 orderless component separator. 356 357 Then, when a new orderless component is desired, use ‘M-SPC’ 358 (‘corfu-insert-separator’) to enter the _first_ component separator in 359 the input, and arbitrary orderless search terms and new separators can 360 be entered thereafter. 361 362 To treat the entire input as Orderless input, you can set the 363 customization option ‘corfu-quit-at-boundary=t’. This disables the 364 predicate which checks if the current completion boundary has been left. 365 In contrast, if you _always_ want to quit at the boundary, simply set 366 ‘corfu-quit-at-boundary=nil’. By default ‘corfu-quit-at-boundary’ is 367 set to ‘separator’ which quits at completion boundaries as long as no 368 separator has been inserted with ‘corfu-insert-separator’. 369 370 Finally, there exists the user option ‘corfu-quit-no-match’ which is 371 set to ‘separator’ by default. With this setting Corfu stays alive as 372 soon as you start advanced filtering with a ‘corfu-separator’ even if 373 there are no matches, for example due to a typo. As long as no 374 separator character has been inserted with ‘corfu-insert-separator’, 375 Corfu will still quit if there are no matches. This ensures that the 376 Corfu popup goes away quickly if completion is not possible. 377 378 In the following we show two configurations, one which works best 379 with auto completion and one which may work better with manual 380 completion if you prefer to always use ‘SPC’ to separate the Orderless 381 components. 382 383 ;; Auto completion example 384 (use-package corfu 385 :custom 386 (corfu-auto t) ;; Enable auto completion 387 ;; (corfu-separator ?_) ;; Set to orderless separator, if not using space 388 :bind 389 ;; Another key binding can be used, such as S-SPC. 390 ;; (:map corfu-map ("M-SPC" . corfu-insert-separator)) 391 :init 392 (global-corfu-mode)) 393 394 ;; Manual completion example 395 (use-package corfu 396 :custom 397 ;; (corfu-separator ?_) ;; Set to orderless separator, if not using space 398 :bind 399 ;; Configure SPC for separator insertion 400 (:map corfu-map ("SPC" . corfu-insert-separator)) 401 :init 402 (global-corfu-mode)) 403 404 405 File: corfu.info, Node: TAB-and-Go completion, Next: Transfer completion to the minibuffer, Prev: Orderless completion, Up: Installation and Configuration 406 407 3.5 TAB-and-Go completion 408 ========================= 409 410 You may be interested in configuring Corfu in TAB-and-Go style. 411 Pressing TAB moves to the next candidate and further input will then 412 commit the selection. Note that further input will not expand snippets 413 or templates, which may not be desired but which leads overall to a more 414 predictable behavior. In order to force snippet expansion, confirm a 415 candidate explicitly with ‘RET’. 416 417 (use-package corfu 418 ;; TAB-and-Go customizations 419 :custom 420 (corfu-cycle t) ;; Enable cycling for `corfu-next/previous' 421 (corfu-preselect-first nil) ;; Disable candidate preselection 422 423 ;; Use TAB for cycling, default is `corfu-complete'. 424 :bind 425 (:map corfu-map 426 ("TAB" . corfu-next) 427 ([tab] . corfu-next) 428 ("S-TAB" . corfu-previous) 429 ([backtab] . corfu-previous)) 430 431 :init 432 (global-corfu-mode)) 433 434 435 File: corfu.info, Node: Transfer completion to the minibuffer, Prev: TAB-and-Go completion, Up: Installation and Configuration 436 437 3.6 Transfer completion to the minibuffer 438 ========================================= 439 440 Sometimes it is useful to transfer the Corfu completion session to the 441 minibuffer, since the minibuffer offers richer interaction features. In 442 particular, Embark (https://github.com/oantolin/embark) is available in 443 the minibuffer, such that you can act on the candidates or 444 export/collect the candidates to a separate buffer. Hopefully we can 445 also add Corfu-support to Embark in the future, such that at least 446 export/collect is possible directly from Corfu. But in my opinion 447 having the ability to transfer the Corfu completion to the minibuffer is 448 an even better feature, since further completion can be performed there. 449 450 The command ‘corfu-move-to-minibuffer’ is defined here in terms of 451 ‘consult-completion-in-region’, which uses the minibuffer completion UI 452 via ‘completing-read’. 453 454 (defun corfu-move-to-minibuffer () 455 (interactive) 456 (let ((completion-extra-properties corfu--extra) 457 completion-cycle-threshold completion-cycling) 458 (apply #'consult-completion-in-region completion-in-region--data))) 459 (define-key corfu-map "\M-m" #'corfu-move-to-minibuffer) 460 461 462 File: corfu.info, Node: Key bindings, Next: Extensions, Prev: Installation and Configuration, Up: Top 463 464 4 Key bindings 465 ************** 466 467 Corfu uses a transient keymap ‘corfu-map’ which is active while the 468 popup is shown. The keymap defines the following remappings and 469 bindings: 470 471 • ‘beginning-of-buffer’ -> ‘corfu-first’ 472 • ‘end-of-buffer’ -> ‘corfu-last’ 473 • ‘scroll-down-command’ -> ‘corfu-scroll-down’ 474 • ‘scroll-up-command’ -> ‘corfu-scroll-up’ 475 • ‘next-line’, ‘down’, ‘M-n’ -> ‘corfu-next’ 476 • ‘previous-line’, ‘up’, ‘M-p’ -> ‘corfu-previous’ 477 • ‘completion-at-point’, ‘TAB’ -> ‘corfu-complete’ 478 • ‘RET’ -> ‘corfu-insert’ 479 • ‘M-g’ -> ‘corfu-info-location’ 480 • ‘M-h’ -> ‘corfu-info-documentation’ 481 • ‘M-SPC’ -> ‘corfu-insert-separator’ 482 • ‘C-g’ -> ‘corfu-quit’ 483 • ‘keyboard-escape-quit’ -> ‘corfu-reset’ 484 485 486 File: corfu.info, Node: Extensions, Next: Complementary packages, Prev: Key bindings, Up: Top 487 488 5 Extensions 489 ************ 490 491 We maintain small extension packages to Corfu in this repository in the 492 subdirectory extensions/ 493 (https://github.com/minad/corfu/tree/main/extensions). The extensions 494 are installed together with Corfu if you pull the package from ELPA. 495 The extensions are inactive by default and can be enabled manually if 496 desired. Furthermore it is possible to install all of the files 497 separately, both ‘corfu.el’ and the ‘corfu-*.el’ extensions. Currently 498 the following extensions come with the Corfu ELPA package: 499 500 • corfu-history 501 (https://github.com/minad/corfu/blob/main/extensions/corfu-history.el): 502 ‘corfu-history-mode’ to remember selected candidates and to improve 503 sorting. 504 • corfu-indexed 505 (https://github.com/minad/corfu/blob/main/extensions/corfu-indexed.el): 506 ‘corfu-indexed-mode’ to select indexed candidates with prefix 507 arguments. 508 • corfu-info 509 (https://github.com/minad/corfu/blob/main/extensions/corfu-info.el): 510 Candidate actions to access the candidate location and 511 documentation. 512 • corfu-quick 513 (https://github.com/minad/corfu/blob/main/extensions/corfu-quick.el): 514 Commands to select using Avy-style quick keys. 515 516 517 File: corfu.info, Node: Complementary packages, Next: Alternatives, Prev: Extensions, Up: Top 518 519 6 Complementary packages 520 ************************ 521 522 Corfu works well together with all packages providing code completion 523 via the ‘completion-at-point-functions’. Many modes and packages 524 already provide a Capf out of the box. Nevertheless you may want to 525 look into complementary packages to enhance your setup. 526 527 • Orderless (https://github.com/oantolin/orderless): Corfu supports 528 completion styles, including the advanced Orderless 529 (https://github.com/oantolin/orderless) completion style, where the 530 filtering expressions are separated by spaces or another character 531 (see ‘corfu-separator’). 532 533 • Cape (https://github.com/minad/cape): Additional Capf backends and 534 ‘completion-in-region’ commands are provided by the Cape 535 (https://github.com/minad/cape) package. Among others, the package 536 supplies a file path and a dabbrev completion backend. Cape 537 provides the ‘cape-company-to-capf’ adapter to reuse Company 538 backends in Corfu. Furthermore the function ‘cape-super-capf’ can 539 merge multiple Capfs, such that the candidates of multiple Capfs 540 are displayed together at the same time. 541 542 • kind-icon (https://github.com/jdtsmith/kind-icon): Icons are 543 supported by Corfu via an external package. For example the 544 kind-icon (https://github.com/jdtsmith/kind-icon) package provides 545 beautifully styled SVG icons based on monochromatic icon sets like 546 material design. 547 548 • corfu-doc (https://github.com/galeo/corfu-doc): The corfu-doc 549 package displays the candidate documentation in a popup next to the 550 Corfu popup, similar to ‘company-quickhelp’. 551 552 • pcmpl-args (https://github.com/JonWaltman/pcmpl-args.el): Extend 553 the Eshell/Shell Pcomplete mechanism with support for many more 554 commands. Similar to the Fish shell, Pcomplete uses man page 555 parsing to dynamically retrieve the completions and helpful 556 annotations. This package brings Eshell completions to another 557 level! 558 559 • Tempel (https://github.com/minad/tempel): Tiny template/snippet 560 package with templates in Lisp syntax, which can be used in 561 conjunction with Corfu. 562 563 • Vertico (https://github.com/minad/vertico): You may also want to 564 look into my Vertico (https://github.com/minad/vertico) package. 565 Vertico is the minibuffer completion counterpart of Corfu. 566 567 568 File: corfu.info, Node: Alternatives, Next: Contributions, Prev: Complementary packages, Up: Top 569 570 7 Alternatives 571 ************** 572 573 • Company (https://github.com/company-mode/company-mode): Company is 574 a widely used and mature completion package, which implements a 575 similar interaction model and popup UI as Corfu. While Corfu 576 relies exclusively on the standard Emacs completion API (Capfs), 577 Company defines its own API for the backends. Company includes its 578 completion backends, which are incompatible with the Emacs 579 completion infrastructure. As a result of this design, Company is 580 a more complex package than Corfu. Company by default uses 581 overlays for the popup in contrast to the child frames used by 582 Corfu. Overall both packages work well, but Company integrates 583 less tightly with Emacs. The ‘completion-styles’ support is more 584 limited and the ‘completion-at-point’ command and the 585 ‘completion-in-region’ function do not invoke Company. 586 587 • Mct (https://git.sr.ht/~protesilaos/mct): Protesilaos’ Minibuffer 588 Confines Transcended package supports both minibuffer completion 589 and completion in region. It reuses the default completion UI for 590 this purpose and installs a timer which live updates the completion 591 buffer. The main advantage of Mct is that you work with a regular 592 Emacs buffer instead of with a popup. You can take advantage of 593 the usual Emacs commands to navigate in the completions buffer. On 594 top, Mct enhances the movement such that you can quickly switch 595 between the completions buffer and the minibuffer or the region 596 which is being completed. Mct does not support timer-based auto 597 completion, but the integration into Emacs is naturally tight. 598 599 • consult-completion-in-region (https://github.com/minad/consult): 600 The Consult package provides the function 601 ‘consult-completion-in-region’ which can be set as 602 ‘completion-in-region-function’ such that it handles 603 ‘completion-at-point’. The function works by transferring the 604 in-buffer completion to the minibuffer. In the minibuffer, the 605 minibuffer completion UI, for example Vertico 606 (https://github.com/minad/vertico) takes over. If you prefer to 607 perform all your completions in the minibuffer 608 ‘consult-completion-in-region’ is your best option. 609 610 611 File: corfu.info, Node: Contributions, Prev: Alternatives, Up: Top 612 613 8 Contributions 614 *************** 615 616 Since this package is part of GNU ELPA 617 (http://elpa.gnu.org/packages/corfu.html) contributions require a 618 copyright assignment to the FSF. 619 620 621 622 Tag Table: 623 Node: Top209 624 Node: Introduction811 625 Node: Features2501 626 Node: Installation and Configuration3917 627 Node: Auto completion9646 628 Node: Completing with Corfu in the minibuffer10495 629 Node: Completing with Corfu in the Eshell or Shell12352 630 Node: Orderless completion15257 631 Node: TAB-and-Go completion18365 632 Node: Transfer completion to the minibuffer19480 633 Node: Key bindings20819 634 Node: Extensions21810 635 Node: Complementary packages23143 636 Node: Alternatives25639 637 Node: Contributions28067 638 639 End Tag Table 640 641 642 Local Variables: 643 coding: utf-8 644 End: