purcell / emacs.d

An Emacs configuration bundle with batteries included
BSD 2-Clause "Simplified" License
6.84k stars 2.05k forks source link

Improperly set `completion-styles` make `consult-line` and `vertico-repeat` not functionally well. #811

Closed lynnux closed 2 years ago

lynnux commented 2 years ago

Setting this https://github.com/purcell/emacs.d/blob/b484cada4356803d0ecb063d33546835f996fefe/lisp/init-minibuffer.el#L13-L15 will cause two problem relate to consult-line and vertico-repeat, details see: https://github.com/minad/consult/issues/571 https://github.com/minad/vertico/issues/227 After setting recommand by minad, like:

(setq completion-styles '(orderless basic)
      completion-category-defaults nil
      completion-category-overrides nil)

all problems are solved.

minad commented 2 years ago

To elaborate a bit.

See also the basic Vertico configuration and my elaborate Orderless configuration, if you are interested in going down that rabbit hole.

purcell commented 2 years ago

Thanks folks, yeah, I'll review the settings and make adjustments — thanks for providing such useful feedback.

purcell commented 2 years ago

I believe this is fixed now btw, thanks all.

minad commented 2 years ago

Thx! Just fyi, I updated Consult such that setting the completion-styles locally in the minibuffer (and per buffer) works properly now. The minibuffer-local setting would then be used for minibuffer completion only (e.g. Vertico) and the buffer-local setting in normal buffers would only apply to in-buffer completion (e.g. Corfu). But I still recommend setting completion styles globally for consistency. Tweaks can be made per completion category (completion-category-defaults, completion-category-overrides).

purcell commented 2 years ago

Great, thanks for taking the time to follow up with this extra info.