After having adapted
vertico--format-candidate
to behave like I want in my Marginalia-less setup, I
noticed I still had undesired documentation during completion.
Now, Daniel Mendler created the beautiful Corfu to improve completion at point
in Emacs. However, he did not forget about old school users such as myself and
provided consult-completion-in-region
for the minibuffer lovers out there.
My only “problem”1 with consult-completion-in-region
is that by default
candidates are offered with some related documentation next to them, much like
what one would see with M-x
were one to use Marginalia. It is
possible to leverage consult-customize
to change a subset of
consult-completion-in-region
details,2 but to remove the extra information
something else is needed.
(define-advice consult-completion-in-region
(:around (&rest args) mu-completion-no-extra-properties)
"Remove extra properties from completion candidates."
(cl-letf (((default-value 'completion-extra-properties) nil))
(apply args)))
A hack, yes, but also another way to prove the level of freedom Emacs empowers the user with.
Note that my small modifications to vertico--format-candidate
and
consult-completion-in-region
are not intended to highlight any Vertico or
Consult shortcomings. These are great packages that improve the standard Emacs
experience, thus they should be tried as they come out of the box for a while.
The fact that I can easily adjust them to my preferences just make them shine
even more.