Re-enable company globally with :defer 2
This commit is contained in:
parent
e72afd6086
commit
965dc56817
|
@ -8,7 +8,7 @@
|
||||||
- [Install](#install)
|
- [Install](#install)
|
||||||
- [Company variables](#company-variables)
|
- [Company variables](#company-variables)
|
||||||
- [Configure](#configure)
|
- [Configure](#configure)
|
||||||
- [Enable company or auto-complete globally](#enable-company-or-auto-complete-globally)
|
- [Remove global activation of company](#remove-global-activation-of-company)
|
||||||
- [Replacing company by auto-complete](#replacing-company-by-auto-complete)
|
- [Replacing company by auto-complete](#replacing-company-by-auto-complete)
|
||||||
- [Add auto-completion in a layer](#add-auto-completion-in-a-layer)
|
- [Add auto-completion in a layer](#add-auto-completion-in-a-layer)
|
||||||
- [Key Bindings](#key-bindings)
|
- [Key Bindings](#key-bindings)
|
||||||
|
@ -55,27 +55,14 @@ to `t`
|
||||||
|
|
||||||
## Configure
|
## Configure
|
||||||
|
|
||||||
### Enable company or auto-complete globally
|
### Remove global activation of company
|
||||||
|
|
||||||
By default Spacemacs enables auto-completion explicitly for each supported
|
TODO (when use-package hooks will be used)
|
||||||
major-mode, it means that `company` and `auto-complete` are not enabled
|
|
||||||
globally, it allows more flexibility to choose an auto-completion engine
|
|
||||||
for a given mode.
|
|
||||||
|
|
||||||
You may want to enable company globally to get auto-completion
|
|
||||||
everywhere even in the modes which are not configured by Spacemacs. To do
|
|
||||||
so, you just have to add `(global-company-mode)` in the
|
|
||||||
`dotspacemacs/config` function of your dotfile.
|
|
||||||
|
|
||||||
Note that if you want to enable auto-complete globally you will have to
|
|
||||||
disable company first, see the next section to do so.
|
|
||||||
|
|
||||||
### Replacing company by auto-complete
|
### Replacing company by auto-complete
|
||||||
|
|
||||||
You can disable company by adding it to the `dotspacemacs-excluded-packages`
|
You can disable company by adding it to the `dotspacemacs-excluded-packages`
|
||||||
variable, then you are free to configure auto-complete and enable it
|
variable, then you are free to enable auto-complete globally.
|
||||||
globally.
|
|
||||||
```
|
|
||||||
|
|
||||||
### Add auto-completion in a layer
|
### Add auto-completion in a layer
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ conflict.")
|
||||||
|
|
||||||
(defun auto-completion/init-company ()
|
(defun auto-completion/init-company ()
|
||||||
(use-package company
|
(use-package company
|
||||||
:defer t
|
:defer 2
|
||||||
:init
|
:init
|
||||||
(progn
|
(progn
|
||||||
(setq company-idle-delay 0.2
|
(setq company-idle-delay 0.2
|
||||||
|
@ -78,6 +78,7 @@ conflict.")
|
||||||
company-clang-prefix-guesser 'company-mode/more-than-prefix-guesser))
|
company-clang-prefix-guesser 'company-mode/more-than-prefix-guesser))
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
|
(global-company-mode)
|
||||||
(spacemacs|diminish company-mode " ⓐ" " a")
|
(spacemacs|diminish company-mode " ⓐ" " a")
|
||||||
;; Set the completion key
|
;; Set the completion key
|
||||||
(if auto-completion-use-tab-instead-of-enter
|
(if auto-completion-use-tab-instead-of-enter
|
||||||
|
|
Loading…
Reference in a new issue