Brief: Set the overall style of completion framework interfaces.
Symbol: modus-themes-completions
(‘alist’ type properties)
This affects Company, Corfu, Flx, Helm, Icomplete/Fido, Ido, Ivy, Orderless, Selectrum, Vertico. The value is an alist that takes the form of a ‘(KEY . PROPERTIES)’ combination. ‘KEY’ is a symbol, while ‘PROPERTIES’ is a list. Here is a sample, followed by a description of the particularities:
(setq modus-themes-completions '((matches . (extrabold background intense)) (selection . (semibold accented intense)) (popup . (accented))))
The matches
key refers to the highlighted characters that correspond
to the user’s input. When its properties are nil
or an empty list,
matching characters in the user interface will have a bold weight and
a colored foreground. The list of properties may include any of the
following symbols regardless of the order they may appear in:
background
to add a background color;
intense
to increase the overall coloration (also amplifies
the background
, if present);
underline
to draw a line below the characters;
italic
to use a slanted font (italic or oblique forms);
light
, semibold
, et
cetera. Valid symbols are defined in the modus-themes-weights
variable. The absence of a weight means that bold will be used.
The selection
key applies to the current line or currently matched
candidate, depending on the specifics of the user interface. When its
properties are nil
or an empty list, it has a subtle gray background,
a bold weight, and the base foreground value for the text. The list
of properties it accepts is as follows (order is not significant):
accented
to make the background colorful instead of gray;
text-also
to apply extra color to the text of the selected line;
intense
to increase the overall coloration;
underline
to draw a line below the characters;
italic
to use a slanted font (italic or oblique forms);
light
, semibold
, et
cetera. Valid symbols are defined in the modus-themes-weights
variable. The absence of a weight means that bold will be used.
The popup
key takes the same values as selection
. The only
difference is that it applies specifically to user interfaces that
display an inline popup and thus have slightly different styling
requirements than the minibuffer. The two prominent packages are
‘company’ and ‘corfu’.
Apart from specifying each key separately, a fallback list is accepted. This is only useful when the desired aesthetic is the same across all keys that are not explicitly referenced. For example, this:
(setq modus-themes-completions '((t . (extrabold intense))))
Is the same as:
(setq modus-themes-completions '((matches . (extrabold intense)) (selection . (extrabold intense)) (popup . (extrabold intense))))
In the case of the fallback, any property that does not apply to the
corresponding key is simply ignored (matches
does not have accented
and text-also
, while selection
and popup
do not have
background
).
Configure bold and italic faces.
Also refer to the documentation of the orderless
package for its
intersection with company
(if you choose to use those in tandem).