company: Fix backward compatibility with 0.9.13.
This commit is contained in:
parent
1357bb03e9
commit
910c1f4507
|
@ -30,6 +30,9 @@
|
|||
(require 'company nil t)
|
||||
(require 'evil-collection)
|
||||
|
||||
;; TODO: `company-tng-configure-default' will be replaced by `company-tng-mode' in 0.9.14.
|
||||
;; See https://github.com/company-mode/company-mode/blob/master/NEWS.md
|
||||
(declare-function company-tng-configure-default "company-tng")
|
||||
(declare-function company-tng-mode "company-tng")
|
||||
|
||||
(defgroup evil-collection-company nil
|
||||
|
@ -88,7 +91,11 @@ be set through custom or before evil-collection loads."
|
|||
(kbd "<escape>") 'company-search-abort)
|
||||
|
||||
;; Sets up YCMD like behavior.
|
||||
(when evil-collection-company-use-tng (company-tng-mode +1))
|
||||
(when evil-collection-company-use-tng
|
||||
(require 'company-tng)
|
||||
(if (fboundp 'company-tng-mode)
|
||||
(company-tng-mode +1)
|
||||
(company-tng-configure-default)))
|
||||
|
||||
;; Make `company-mode' not show popup when not in supported state
|
||||
(advice-add 'company-call-backend :before-while 'evil-collection-company-supported-p))
|
||||
|
|
Loading…
Reference in New Issue