From 014ed73109269a0dc927577d00e384317db38177 Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Wed, 10 Jan 2018 22:19:04 -0500 Subject: [PATCH] ivy: change layer variable name for ivy-rich and add doc --- layers/+completion/ivy/README.org | 16 ++++++++++++++++ layers/+completion/ivy/config.el | 12 ++++++++---- layers/+completion/ivy/packages.el | 2 +- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/layers/+completion/ivy/README.org b/layers/+completion/ivy/README.org index 40379a6fd..e30472325 100644 --- a/layers/+completion/ivy/README.org +++ b/layers/+completion/ivy/README.org @@ -5,6 +5,8 @@ - [[#features][Features:]] - [[#install][Install]] - [[#configuration][Configuration]] + - [[#general][General]] + - [[#advanced-buffer-information][Advanced buffer information]] - [[#key-bindings][Key Bindings]] - [[#transient-state][Transient state]] @@ -24,6 +26,7 @@ Mastering your choice of completion system will make you a Spacemacs power user. - Buffer wide dynamic text search via =swiper= - Detailed configuration parameters for ivy appearance - Intuitive =transient state= +- Advanced buffer information with =ivy-rich= * Install To use this configuration layer, add it to your =~/.spacemacs=. You will need to @@ -31,6 +34,7 @@ add =ivy= to the existing =dotspacemacs-configuration-layers= list in this file. * Configuration +** General You can customize ivy with the following variables: - =ivy-wrap= Whether C-n and C-p should wrap-around when at the the first or @@ -44,6 +48,18 @@ You can customize ivy with the following variables: - =ivy-use-selectable-prompt= When non-nil, make the prompt line selectable like a candidate. The Spacemacs default value is =t=. +** Advanced buffer information +To display more information about buffers set the layer variable +=ivy-enable-advanced-buffer-information= to =t= which will enable =ivy-rich=. + +Note that =ivy-rich= has been reported to be very slow on =macOS=. This feature +is disabled by default. + +#+BEGIN_SRC emacs-lisp + (setq-default dotspacemacs-configuration-layers '( + (ivy :variables ivy-enable-advanced-buffer-information t))) +#+END_SRC + * Key Bindings If you choose =ivy= as completion system, make sure to read the [[http://oremacs.com/swiper/][official manual]]. In case you don't want to read everything, at least familiarise with diff --git a/layers/+completion/ivy/config.el b/layers/+completion/ivy/config.el index c3d44d4b3..d97ce7133 100644 --- a/layers/+completion/ivy/config.el +++ b/layers/+completion/ivy/config.el @@ -9,8 +9,15 @@ ;; ;;; License: GPLv3 + -;; Variables +;; Layer Variables + +(defvar ivy-enable-advanced-buffer-information nil + "If non-nil, enable `ivy-rich' which adds information on buffers.") + + +;; Private Variables (defvar spacemacs--counsel-commands '(;; --line-number forces line numbers (disabled by default on windows) @@ -47,6 +54,3 @@ than this amount.") for desc = (nth 2 j) collect `(,key (lambda (x) (spacemacs//counsel-with-git-grep (quote ,func) x)) ,desc)) "Default ivy actions to be used with git-grep output.") - -(defvar ivy-enable-ivy-rich nil - "If non-nil, enable `ivy-rich'") diff --git a/layers/+completion/ivy/packages.el b/layers/+completion/ivy/packages.el index 8ea1d90e4..b2267bdaf 100644 --- a/layers/+completion/ivy/packages.el +++ b/layers/+completion/ivy/packages.el @@ -20,7 +20,7 @@ helm-make ivy ivy-hydra - (ivy-rich :toggle ivy-enable-ivy-rich) + (ivy-rich :toggle ivy-enable-advanced-buffer-information) (ivy-spacemacs-help :location local) org persp-mode