Skip to content
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

Don't sort candidates #31

Open
mssdvd opened this issue Jul 24, 2018 · 2 comments
Open

Don't sort candidates #31

mssdvd opened this issue Jul 24, 2018 · 2 comments

Comments

@mssdvd
Copy link

mssdvd commented Jul 24, 2018

Is it possible to not sort company's candidates?
Jedi returns the normal objects first and then the magical ones instead company shows them in reverse.
I think is better to keep what jedi provides.
company
image

completion-at-point with ivy
image

Config:

;; company
;; https://company-mode.github.io/
(use-package company
  :delight
  :defer 1
  :bind
  ([remap indent-for-tab-command] . company-indent-or-complete-common)
  ([M-tab] . company-indent-or-complete-common)
  ("C-c y" . company-yasnippet)
  (:map company-active-map
        ([tab] . company-complete-common-or-cycle)
        ([M-tab] . company-complete-common-or-cycle))
  :config
  (setq company-tooltip-align-annotations t
        company-show-numbers t
        company-minimum-prefix-length 2)
  (company-tng-configure-default)
  (global-company-mode)
  (defun add-pcomplete-to-capf ()
    (add-hook 'completion-at-point-functions 'pcomplete-completions-at-point nil t))
  :hook (org-mode . add-pcomplete-to-capf))

;; anaconda-mode
;; https://github.com/proofit404/anaconda-mode
(use-package anaconda-mode
  :delight
  :hook
  (python-mode)
  (python-mode . anaconda-eldoc-mode))

;; company-anaconda
;; https://github.com/proofit404/company-anaconda
(use-package company-anaconda
  :after (anaconda-mode company)
  :config (add-to-list 'company-backends '(company-anaconda :with company-capf)))
@CeleritasCelery
Copy link
Contributor

If you remove the sexp on line 146 does that give the behavior you want?

@jgrey4296
Copy link

jgrey4296 commented Feb 17, 2023

this issue is pretty old by now, but for anyone who comes across it:
company strongly tries to sort (in company--preprocess-candidates)
candidates of grouped backends.
So setting '(company-anaconda ...) will easily override CA's sorted response,
unless :separate is in the list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants