diff options
author | Bozhidar Batsov <bozhidar@batsov.com> | 2015-08-09 12:38:49 +0300 |
---|---|---|
committer | Bozhidar Batsov <bozhidar@batsov.com> | 2015-08-09 12:38:49 +0300 |
commit | 67ab67dab1e0ea5064b3a354bbcce7c9db068ba5 (patch) | |
tree | 62fc6e28ddd2998c36831ddb7278d9f316ef61ac /cider-overlays.el | |
parent | 92310b0be10099e3c81ce250a5a07b5e4b4f54e7 (diff) |
Make it possible to disable Clojure font-locking for interactive eval results
This can potentially yield performance improvements when dealing with
huge results.
Diffstat (limited to 'cider-overlays.el')
-rw-r--r-- | cider-overlays.el | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cider-overlays.el b/cider-overlays.el index cf3f4654..4d63f262 100644 --- a/cider-overlays.el +++ b/cider-overlays.el @@ -37,6 +37,12 @@ If it is non-nil, this face is only used on the prefix (usually a \"=>\")." :group 'cider :package-version "0.9.1") +(defcustom cider-result-use-clojure-font-lock t + "If non-nil, interactive eval results are font-locked as Clojure code." + :group 'cider + :type 'boolean + :package-version '(cider . "0.10.0")) + (defcustom cider-ovelays-use-font-lock nil "If non-nil, results overlays are font-locked as Clojure code. If nil, apply `cider-result-overlay-face' to the entire overlay instead of @@ -163,7 +169,9 @@ overlay at the end of the line containing POINT. Note that, while POINT can be a number, it's preferable to be a marker, as that will better handle some corner cases where the original buffer is not focused." - (let* ((font-value (cider-font-lock-as-clojure value)) + (let* ((font-value (if cider-result-use-clojure-font-lock + (cider-font-lock-as-clojure value) + value)) (used-overlay (when (and point cider-use-overlays) (cider--make-result-overlay font-value point cider-eval-result-duration)))) |