This set of options affects the completion candidates (the suggestions that appear when you press M-x and then TAB, or when you use TAB at other prompts).
You can use the arrow keys to select completion candidates in the minibuffer, and you can use RET to select the highlighted one.
(setopt minibuffer-visible-completions t)
Additional details for completion suggestions are shown before or after the suggestions. For example, M-x describe-symbol (C-h o) shows additional information.
(setopt completions-detailed t)
Completion candidates can be grouped together if the function that sets up the completion specifies it.
(setopt completions-group t)
When you press TAB to see the completion candidates for a prompt (for example, M-x and then TAB), the first TAB will display the completion list, and the second TAB will select the buffer.
(setopt completion-auto-select 'second-tab)
This Completions buffer will update as you type so that you can narrow down the candidates.
(setopt completion-eager-update t)
The following completion styles are set up:
- basic: You can type the start of a candidate. (ex:
abc will list abcde and abcxyz)
- partial-completion: You can specify multiple words and each word will be considered as the prefix for matching candidates. For example, if you type
a-b, that will match apple-banana if it is one of the options.
- emacs22: When you move your point to the middle of some text and then complete, the text before your point is used to filter the completion and the text after your point is added to the end of the result.
More info: Completion styles
(setopt completion-styles '(basic emacs22 flex))
Automatically show the completion preview based on the text at point. TAB accepts the completion suggestion and M-i completes the longest common prefix.
(setopt global-completion-preview-mode t)
TAB first tries to indent the current line. If the line
was already indented, then Emacs tries to complete the thing at point.
Some programming language modes have their own variable to control this,
e.g., c-tab-always-indent, so it might need additional customization.
(setopt tab-always-indent 'complete)