oantolin / orderless

Emacs completion style that matches multiple regexps in any order
GNU General Public License v3.0
771 stars 27 forks source link

Use company, orderless, company-fuzzy, auctex, and ispell all together. #138

Closed hongyi-zhao closed 1 year ago

hongyi-zhao commented 1 year ago

I want to obtain the following purpose:

  1. For minibuffer completion, using orderless.
  2. For normal buffer completion with auctex based LaTeX document preparation, using company-fuzzy, ispell, and the self-made english-wordlist.

I'm not sure if this is possible. Currently, I encounter a problem, which has not been solved yet.

Any hints/comments will be appreciated.

Regards, Zhao

oantolin commented 1 year ago

Did I read that issue you linked correctly? It sounds like you still had the problem even without orderless, no?

hongyi-zhao commented 1 year ago

It seems like this, and my ultimate goal is to obtain the maximum convenience from the collaborative work of all these packages/tools/methods. However, objectively speaking, we have not yet reached a conclusion on what caused the above problem.

oantolin commented 1 year ago

Sure, but in that case, since this seems like a problem with company, not orderless, I'm unlikely to be able to help (I don't use company myself).

hongyi-zhao commented 1 year ago

Ok, I see and will close this issue.

oantolin commented 1 year ago

I installed company and tried the code suggested here and for me both iso and isoph give the expected completions, even with orderless configured. So if you don't get the correct results for isoph something else is going on. It's weird.

hongyi-zhao commented 1 year ago

Thank you for your validation and confirmation. This is indeed good news! Could you please show all your configurations involved in the above testing?

In fact, I still can't figure out the appropriate configuration of working with orderless and company. More specifically, I try the following configuration:

(use-package orderless
  :ensure t
  :custom
  (setq orderless-component-separator "[ &]")

  ;; We follow a suggestion by company maintainer u/hvis:
  ;; https://www.reddit.com/r/emacs/comments/nichkl/comment/gz1jr3s/
  (defun company-completion-styles (capf-fn &rest args)
    (let ((completion-styles '(basic partial-completion)))
      (apply capf-fn args))

    (advice-add 'company-capf :around #'company-completion-styles)
    )
  )

With the above setting, the following search in minibuffer returns nothing:

image