Commits

Peter Szilagyi committed afa11b3

Incorporated jli's original microfeature patch via sweeks.

Comments (0)

Files changed (1)

js-micro-features.el

 
 ;; (Jane.rainbow-delimiters)
 (defun Jane.rainbow-delimiters ()
-  "Color delimiters based on depth.
+  "Color delimiters based on depth, including first atom in sexps.
 
 \\[global-rainbow-delimiters-mode] observes
 `rainbow-delimiters-maximum-size' for individual buffers, but you
 compiling, `rainbow-delimiters-mode' is slow, especially when
 disabling in large buffers."
   ;; pszilagyi: In fact, I turned bharrison's first guess at a limit
-  ;; (10e6) down quite a bit, just in case.
+  ;; (10MB) down quite a bit, just in case.
   (load-library
    ;;"elisp/contrib/rainbow-delimiters.el"
    "elisp/contrib/rainbow-sexp.el"      ; jli
   (defadvice rainbow-delimiters-mode-enable (around maximum-size activate)
     "Skip buffers larger than `rainbow-delimiters-maximum-size'."
     (if (<= (buffer-size) rainbow-delimiters-maximum-size) ad-do-it))
+
+  ;; Another approach, taken by jli below in his customizations, is to
+  ;; only use rainbow-delimiters-mode in conjunction with lisp-mode.
+  ;;(require 'rainbow-delimiters)
+  (custom-set-variables
+   '(rainbow-delimiters-highlight-first-term-p t))
+  (custom-set-faces
+   '(rainbow-delimiters-depth-1-face ((((background dark)) (:foreground "grey55"))))
+   '(rainbow-delimiters-depth-2-face ((((background dark)) (:foreground "#dbe091"))))
+   '(rainbow-delimiters-depth-3-face ((((background dark)) (:foreground "#e0be91"))))
+   '(rainbow-delimiters-depth-4-face ((((background dark)) (:foreground "#91e095"))))
+   '(rainbow-delimiters-depth-5-face ((((background dark)) (:foreground "#91c1e0"))))
+   '(rainbow-delimiters-depth-6-face ((((background dark)) (:foreground "#9791e0"))))
+   '(rainbow-delimiters-depth-7-face ((((background dark)) (:foreground "#ce91e0"))))
+   '(rainbow-delimiters-depth-8-face ((((background dark)) (:foreground "#e091b1"))))
+   '(rainbow-delimiters-depth-9-face ((((background dark)) (:foreground "#e0217f"))))
+   '(rainbow-delimiters-unmatched-face ((((background dark)) (:foreground "red")))))
+  ;;(add-hook 'lisp-mode-hook 'rainbow-delimiters-mode)
+
   (global-rainbow-delimiters-mode 1))
 
-
-
 ;; (Jane.recentf)
 (defun Jane.recentf ()
   "Remember recently opened files."
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.