Switched dotfile options to which-key

Renamed option
Added buffer position option
Updated template
Updated documentation
This commit is contained in:
Tim Jäger 2015-07-25 18:56:06 +02:00 committed by syl20bnr
parent 82c905559a
commit 91057d5986
3 changed files with 22 additions and 2 deletions

View File

@ -135,6 +135,14 @@ several times cycle between the kill ring content.'")
(defvar dotspacemacs-guide-key-delay 0.4
"Guide-key delay in seconds.")
(defvar dotspacemacs-which-key-delay 0.4
"Which-key delay in seconds.")
;; TODO: Implement me
;; Possible options should be: right bottom right-then-bottom
(defvar dotspacemacs-which-key-position 'right-then-bottom
"Which-key position in seconds.")
(defvar dotspacemacs-loading-progress-bar t
"If non nil a progress bar is displayed when spacemacs is loading. This
may increase the boot time on some systems and emacs builds, set it to nil

View File

@ -117,9 +117,13 @@ values."
;; If non nil the paste micro-state is enabled. When enabled pressing `p`
;; several times cycle between the kill ring content.
dotspacemacs-enable-paste-micro-state nil
;; Guide-key delay in seconds. The Guide-key is the popup buffer listing
;; Which-key delay in seconds. The Which-key is the popup buffer listing
;; the commands bound to the current keystrokes.
dotspacemacs-guide-key-delay 0.4
dotspacemacs-which-key-delay 0.4
;; Which-key frame position. Possible values are right, bottom and
;; right-then-bottom. Right-then-bottom tries to display the frame to the
;; right. If there is insufficient space, it displays it at the bottom.
dotspacemacs-which-key-position 'right
;; If non nil a progress bar is displayed when spacemacs is loading. This
;; may increase the boot time on some systems and emacs builds, set it to
;; nil ;; to boost the loading time.

View File

@ -3657,6 +3657,14 @@ one of `l' or `r'."
(use-package which-key
:init
(progn
(setq which-key-max-description-length 32
which-key-idle-delay dotspacemacs-which-key-delay)
(which-key-mode)
(cond
((eq dotspacemacs-which-key-position 'right) (which-key-setup-side-window-right))
((eq dotspacemacs-which-key-position 'bottom) (which-key-setup-side-window-bottom))
((eq dotspacemacs-which-key-position 'right-then-bottom) (which-key-setup-side-window-right-bottom))
nil)
(spacemacs|add-toggle which-key
:status which-key-mode
:on (which-key-mode)