In GNU Emacs, completion of things is a complex subject . There are at least two sorts of completion ( in the minibuffer and in buffers you're editing ) and many options for how things work. There's a whole ecology of third party packages for changing how both sorts of completion operate, some of which have become built in to GNU Emacs over time. For various reasons ( cf ) I'm going to write down my current setup for this.
For minibuffer completion I use:
- vertico to show more completion candidates, with some significant customizations and custom code to complete MH folder names , and also some forced completion categories .
- marginalia to add more information about completion candidates, except that I've then arranged for completion of GNU Emacs functions and variables to show less information because I mostly want to see their docstrings, not type and argument information.
(Doing this isn't a standard marginalia option and instead requires somewhat annoying hacks.)
- orderless to provide more powerful completion options, except I use orderless in an unusually minimal configuration . Orderless technically can be used for completion in buffers, but I don't have that connected up in any useful way at the moment.
- consult to provide more context on various sorts of minibuffer completion results. Consult needs or benefits from having some additional packages wired up, like consult-flycheck, consult-flyspell , consult-eglot , and consult-eglot-embark, although I don't necessarily remember to use them very often.
For as I type in buffer completion, I use:
- completion-preview-mode gives me a shell style completion environment, where I can hit TAB at any time to complete the current prefix (mostly) and I can see what that prefix is as a little ahead-of-cursor annotation. It's really great and is almost always all I really want.
- corfu for 'completion at point' and to some degree as I type autocompletion, across both non-LSP and LSP modes (which is a change from before). I have a relatively restricted Corfu configuration which deliberately dials down how in my face it is. I turn on Corfu as you type autocompletion in prog-mode buffers but not in text mode buffers.
A lot of my completion configuration has been stable for a while. The big recent changes were switching to only using Corfu instead of a mix of Company and Corfu , and my discovery of completion-preview-mode .
This is a lot of packages to customize completion, but that's the modern GNU Emacs way ; you have relatively narrowly focused packages that deal with one aspect of a large GNU Emacs feature. If you customize multiple aspects, you wind up with a lot of packages (both primary packages like consult and also secondary packages like consult-eglot that extend the primary package and connect it to other things).