Lazy-load company-mode

This commit is contained in:
Henrik Lissner 2016-06-04 22:31:01 -04:00
parent 92482309fc
commit e21607f567
3 changed files with 18 additions and 8 deletions

View file

@ -54,7 +54,9 @@
(defun doom/company-complete ()
"Bring up the completion popup. If there is only one result, auto-complete it."
(interactive)
(when (and (company-manual-begin)
(require 'company)
(when (and (bound-and-true-p company-mode)
(company-manual-begin)
(= company-candidates-length 1))
(company-complete-common)))

View file

@ -10,6 +10,7 @@
(quoted (eq (car-safe backends) 'quote)))
`(progn
(defun ,def-name ()
(require 'company)
(set (make-local-variable 'company-backends)
(append '((,@(mapcar (lambda (backend)
(if quoted