Closed Eason0210 closed 3 years ago
So completion-styles
was set to (substring orderless)
, and that var apparently affects completion-at-point. The solution here was to remove substring
from completion-styles
: the new value is (basic partial-completion orderless)
. At least in the above case, this yields a more reasonable result.
Not as a fix, but as an additional option, you might also be interested to try company-transformers customization setting. Such as, f.i.
(setq company-transformers '(company-sort-by-occurrence))
Interesting, thanks. I checked it out briefly but it wasn't obvious to me if there'd be a benefit right now.
Hi, @purcell
Now we have changed the completion style to (setq completion-styles '(basic partial-completion orderless))
globally, this also affect the completion in minibuffer. Now the behavior is like this:
I think it is better to set minibuffer completion-styles to use only orderless to get a better experience.
something like this would work.
(defun sanityinc/use-orderless-in-minibuffer ()
(setq-local completion-styles '(substring orderless)))
(add-hook 'minibuffer-setup-hook 'sanityinc/use-orderless-in-minibuffer)
Now it the behavior is like this:
Agree, done
@purcell After I set a local value in minibuffer, It seems confilct with consult async related command.
See https://github.com/minad/consult/issues/396, the origin grep and filter style fails.
Another possible solution : https://github.com/oantolin/orderless/issues/48#issuecomment-856750410
(define-advice company-capf
(:around (orig-fun &rest args) set-completion-styles)
(let ((completion-styles '(basic partial-completion)))
(apply orig-fun args)))
(setq completion-styles '(orderless))
Hi @purcell , with latest commit, the order of company candidates is incorrect in Emacs lisp mode. But it works well in the other major modes .
similar issue, orderless & company-capf