-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to disable orderless for company or corfu #136
Comments
One simple way to do it would be to set (setq completion-styles '(basic partial-completion)) ; styles for corfu & company
(defun use-orderless ()
(setq-local completion-styles '(orderless))) ; styles for minibuffer commands such as consult commands
(add-hook 'minibuffer-mode-hook #'use-orderless) But maybe, in case this is an XY problem, let me ask: why do you want to disable orderless for corfu and company? |
Hi @oantolin , yeah I prefer company/corfu use substring for completion. When I type something, normally I can remember the prefix of what I am trying to type, so orderless is an overkill for me. |
That's not such a good fix actually, when taking more packages like Consult into account. I haven't found the ideal fix for Corfu yet to be honest. The problem with activating orderless only within the minibuffer is that it doesn't play nicely with |
Fair enough, @ydzhou. I obviously hadn't checked all the consequences, @minad. Thanks for pointing those issues out. As for a good way to control completion-styles for Corfu, is there any way to detect if Corfu is currently open, some varíable or something? If so, one could write a new completion style that simply delegates to one completion style or another depending on whether Corfu is asking or not. |
Also, consult-line already stores a marker in a text property, right? Isn't that marker obtained while the minibuffer is open? Why does it need to use completion again. Or am I just wrong about the location being stored in a text property, @minad ? |
In order to highlight the matches. |
Oh, right! |
This works, but messy.
|
Hi
How can I disable orderless for autocompletion plugin e.g. company-mode or corfu? But still keep it enabled for consult.
The text was updated successfully, but these errors were encountered: