Skip to content

Commit 671bc9c

Browse files
TheBBsyl20bnr
authored andcommitted
Fix auto-completion toggle without default
1 parent 23502e1 commit 671bc9c

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

layers/auto-completion/config.el

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111

1212
;; Company -------------------------------------------------------------------
1313

14+
(defvar-local auto-completion-front-end 'company
15+
"Which auto-completion front end to use.")
16+
1417
(defvar auto-completion-return-key-behavior 'complete
1518
"What the RET key should do when auto-completion menu is active.
1619
Possible values are `complete' or `nil'.")

layers/auto-completion/funcs.el

+3-7
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,9 @@
1111

1212
(spacemacs|add-toggle auto-completion
1313
:status
14-
(if (boundp 'auto-completion-front-end)
15-
(if (eq 'company auto-completion-front-end)
16-
company-mode
17-
auto-complete-mode)
18-
;; default completion hardcoded to be company for now
19-
(setq auto-completion-front-end 'company)
20-
nil)
14+
(if (eq 'company auto-completion-front-end)
15+
(bound-and-true-p company-mode)
16+
(bound-and-true-p auto-complete-mode))
2117
:on
2218
(progn
2319
(if (eq 'company auto-completion-front-end)

0 commit comments

Comments
 (0)