mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
Enable company mode when asked to autocomplete
This commit is contained in:
@ -42,6 +42,8 @@
|
|||||||
"`company-mode' completion backend that completes whole-lines, akin to vim's
|
"`company-mode' completion backend that completes whole-lines, akin to vim's
|
||||||
C-x C-l."
|
C-x C-l."
|
||||||
(interactive (list 'interactive))
|
(interactive (list 'interactive))
|
||||||
|
(require 'company)
|
||||||
|
(unless (bound-and-true-p company-mode) (company-mode))
|
||||||
(let ((lines (doom--company-whole-lines)))
|
(let ((lines (doom--company-whole-lines)))
|
||||||
(cl-case command
|
(cl-case command
|
||||||
(interactive (company-begin-backend 'doom/company-whole-lines))
|
(interactive (company-begin-backend 'doom/company-whole-lines))
|
||||||
@ -59,8 +61,8 @@ C-x C-l."
|
|||||||
"Bring up the completion popup. If only one result, complete it."
|
"Bring up the completion popup. If only one result, complete it."
|
||||||
(interactive)
|
(interactive)
|
||||||
(require 'company)
|
(require 'company)
|
||||||
(when (and (bound-and-true-p company-mode)
|
(unless (bound-and-true-p company-mode) (company-mode))
|
||||||
(company-manual-begin)
|
(when (and (company-manual-begin)
|
||||||
(= company-candidates-length 1))
|
(= company-candidates-length 1))
|
||||||
(company-complete-common)))
|
(company-complete-common)))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user