core: new variable dotspacemacs-ask-for-lazy-installation

This commit is contained in:
syl20bnr 2016-03-27 15:56:15 -04:00
parent 5e5b7a6569
commit ae9f40ae77
3 changed files with 12 additions and 7 deletions

View file

@ -993,11 +993,11 @@ path."
(defun configuration-layer//lazy-install-packages (layer-name mode) (defun configuration-layer//lazy-install-packages (layer-name mode)
"Install layer with LAYER-NAME to support MODE." "Install layer with LAYER-NAME to support MODE."
(when (and (configuration-layer//lazy-install-p layer-name) (when (or (not dotspacemacs-ask-for-lazy-installation)
(yes-or-no-p (format (yes-or-no-p (format
(concat "Support for %s requires installation of " (concat "Support for %s requires installation of "
"layer %s, do you want to install it?") "layer %s, do you want to install it?")
mode layer-name))) mode layer-name)))
(when (dotspacemacs/add-layer layer-name) (when (dotspacemacs/add-layer layer-name)
(configuration-layer/sync 'no-install)) (configuration-layer/sync 'no-install))
(let* ((layer (object-assoc layer-name :name configuration-layer--layers)) (let* ((layer (object-assoc layer-name :name configuration-layer--layers))

View file

@ -75,6 +75,10 @@ that support lazy installation even the layers listed in
and you have to explicitly list a layer in the variable and you have to explicitly list a layer in the variable
`dotspacemacs-configuration-layers' to install it.") `dotspacemacs-configuration-layers' to install it.")
(defvar dotspacemacs-ask-for-lazy-installation t
"If non-nil then Spacemacs will ask for confirmation before installing
a layer lazily.")
(defvar dotspacemacs-additional-packages '() (defvar dotspacemacs-additional-packages '()
"List of additional packages that will be installed wihout being "List of additional packages that will be installed wihout being
wrapped in a layer. If you need some configuration for these wrapped in a layer. If you need some configuration for these

View file

@ -21,9 +21,10 @@ values."
;; variable `dotspacemacs-configuration-layers' to install it. ;; variable `dotspacemacs-configuration-layers' to install it.
;; (default 'unused) ;; (default 'unused)
dotspacemacs-enable-lazy-installation 'unused dotspacemacs-enable-lazy-installation 'unused
;; If non-nil then Spacemacs will ask for confirmation before installing
;; a layer lazily. (default t)
dotspacemacs-ask-for-lazy-installation t
;; If non-nil layers with lazy install support are lazy installed. ;; If non-nil layers with lazy install support are lazy installed.
;; (default t)
dotspacemacs-enable-lazy-installation t
;; List of additional paths where to look for configuration layers. ;; List of additional paths where to look for configuration layers.
;; Paths must have a trailing slash (i.e. `~/.mycontribs/') ;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
dotspacemacs-configuration-layer-path '() dotspacemacs-configuration-layer-path '()