Syntax highlighting
Dynamic syntax highlighting
CIDER can syntax highlight symbols that are known to be defined. By default,
this is done on symbols from the clojure.core
namespace, as well as macros
from any namespace. If you’d like CIDER to also colorize usages of functions
and variables from any namespace, do:
(setq cider-font-lock-dynamically '(macro core function var))
Here’s how code looks without dynamic syntax highlighting.
And here’s how the code looks when it’s turned on.
Syntax highlighting for reader conditionals
By default CIDER will apply font-locking to unused reader conditional expressions depending on the buffer’s CIDER connection type.
You can disable this behavior by adjusting cider-font-lock-reader-conditionals
:
(setq cider-font-lock-reader-conditionals nil)
Customizing CIDER faces
CIDER defines a few custom faces that you might want to adjust (although normally your color theme should take care of them):
-
cider-deprecated-face
- used for syntax highlighting deprecated vars -
cider-instrumented-face
- used for syntax highlighting instrumented for debugging vars -
cider-traced-face
- used for syntax highlighting traced vars -
cider-reader-conditional-face
- used for syntax highlighting inactive reader conditional branches