File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
doc/modules/ROOT/pages/repl Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,6 @@ You can customize the buffer name using the variable
125
125
`cider-session-name-template`. See the documentation for this variable for
126
126
details.
127
127
128
-
129
128
== Font-locking
130
129
131
130
Normally, code in the REPL is font-locked the same way as in
@@ -140,7 +139,22 @@ use:
140
139
(setq cider-repl-use-clojure-font-lock nil)
141
140
----
142
141
143
- Note that enabling font-locking in the REPL can negatively impact performance.
142
+ NOTE: Using Clojure font-locking in the REPL can impact performance negatively, especially
143
+ when it comes to font-locking huge results. That, however, is mitigated to a big extent
144
+ by result streaming.
145
+
146
+ === Font-locking of Results
147
+
148
+ There are a few things you need to keep in mind about Clojure font-locking of results:
149
+
150
+ * When streaming is enabled only single-chunk results will be font-locked as Clojure, as
151
+ each chunk is font-locked by itself and the results can't really be combined
152
+ * The font-locking of results is an expensive operation which involves copying the value
153
+ to a temporary buffer, where we check its integrity and do the actual font-locking.
154
+
155
+ TIP: If you'd like to learn more about the font-locking of results you can check
156
+ out the definition of `clojure-font-lock-as` and `clojure-font-lock-as-clojure`
157
+ in `cider-util.el`.
144
158
145
159
== Pretty printing in the REPL
146
160
You can’t perform that action at this time.
0 commit comments