branch: master
commit 76db661dde5a1bd748d510825ce1e3ae69ef7302
Author: Justin Burkett <[email protected]>
Commit: Justin Burkett <[email protected]>

    Highlight custom variables in counsel-describe-variable
    
    counsel.el (counsel-describe-variable-transformer): Add
---
 counsel.el | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/counsel.el b/counsel.el
index 6d252c0..ffea81d 100644
--- a/counsel.el
+++ b/counsel.el
@@ -445,6 +445,15 @@ Update the minibuffer with the amount of lines collected 
every
          (push (symbol-name vv) cands))))
     cands))
 
+(defun counsel-describe-variable-transformer (var)
+  "Propertize VAR if it's a custom variable."
+  (if (custom-variable-p (intern var))
+      (propertize var 'face 'font-lock-variable-name-face)
+    var))
+
+(ivy-set-display-transformer
+ 'counsel-describe-variable 'counsel-describe-variable-transformer)
+
 ;;;###autoload
 (defun counsel-describe-variable ()
   "Forward to `describe-variable'."

Reply via email to