From 3f7501fe9210aee1734cf492376e9152885c7e9e Mon Sep 17 00:00:00 2001 From: justbur Date: Mon, 1 Feb 2016 13:24:58 -0500 Subject: [PATCH] ivy: Use ivy for auto-highlight-symbol search --- layers/+completion/spacemacs-ivy/packages.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/layers/+completion/spacemacs-ivy/packages.el b/layers/+completion/spacemacs-ivy/packages.el index c4dce673d..8314d4b3b 100644 --- a/layers/+completion/spacemacs-ivy/packages.el +++ b/layers/+completion/spacemacs-ivy/packages.el @@ -10,7 +10,8 @@ ;;; License: GPLv3 (setq spacemacs-ivy-packages - '(counsel + '(auto-highlight-symbol + counsel flx ;; hack since ivy is part for swiper but I like to ;; treat it as a stand-alone package @@ -291,6 +292,14 @@ Helm hack." ;; TODO: Commands to port (spacemacs//ivy-command-not-implemented-yet "jI")))) +(defun spacemacs-ivy/post-init-auto-highlight-symbol () + (setq spacemacs-symbol-highlight-transient-state-remove-bindings + '("/" "b" "f")) + (setq spacemacs-symbol-highlight-transient-state-add-bindings + '(("/" spacemacs/search-project-auto-region-or-symbol :exit t) + ("b" spacemacs/swiper-all-region-or-symbol :exit t) + ("f" spacemacs/search-auto-region-or-symbol :exit t)))) + (defun spacemacs-ivy/init-flx ()) (defun spacemacs-ivy/init-ivy ()