Closed futurist closed 7 years ago
That's strange because, as far as I know, exact matches should always get priority. Let me look into it.
@futurist For me, kbd
matches kbd
first. Are you sure something isn't interfering with your sorting?
below is my config with company-flx:
(require-package 'company)
(require-package 'company-flx)
(require-package 'company-tern)
(require-package 'company-quickhelp)
(add-hook 'after-init-hook 'global-company-mode)
(setq company-idle-delay 0)
(setq company-minimum-prefix-length 2)
(after-load 'company
(company-flx-mode +1)
(setq company-auto-complete t)
(setq company-flx-limit 15)
(define-key company-active-map (kbd "<SPC>") '(lambda()(interactive) (company-abort) (insert " ")))
(define-key company-active-map (kbd "C-j") 'company-abort)
(define-key company-active-map (kbd "<tab>") 'company-complete-common-or-cycle)
(define-key company-active-map "\C-n" 'company-select-next-or-abort)
(define-key company-active-map "\C-p" 'company-select-previous-or-abort)
)
(after-load 'company-tern
(add-to-list 'company-backends 'company-tern)
)
I think the problem maybe is the (setq company-minimum-prefix-length 2)
kb will trigger company first, then with third key d, the sort order don't changed.
I think the problem maybe is the
(setq company-minimum-prefix-length 2)
I don't think so because I also use that setting. I'll take a look today, if I get the chance.
To confirm, I still can't reproduce.
When input
kbd
now the candidate popup is:In this case, should it the kbd as first candidate?
similar case, when input
setq