company-anaconda icon indicating copy to clipboard operation
company-anaconda copied to clipboard

Don't sort candidates

Open mssdvd opened this issue 7 years ago • 2 comments

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)))

mssdvd avatar Jul 24 '18 18:07 mssdvd

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

CeleritasCelery avatar Sep 13 '19 14:09 CeleritasCelery

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.

jgrey4296 avatar Feb 17 '23 21:02 jgrey4296