Cider configuration variables.λ︎
The following in non-authoritative list of configuration variables, created by searching for defcustom
across the clojure-emacs/cider project.
Variables are grouped by the files they are defined in throughout the clojure-emacs/cider project.
CIDER Variables can be set via:
.dir-locals.el
files for project specific configuration(clojure :variables variable-name value)
in .spacemacs layers list(setq variable-name value)
indotspacemacs/user-config
section of.spacemacs
Hint::Clojure Project Configurationλ︎
Examples of using
.dir-locals.el
for Clojure projects are covered in the project level configuration page
Completionλ︎
Variables | Default value | Description |
---|---|---|
cider-completion-use-context | true - use context at point to improve completion suggestions |
|
cider-annotate-completion-candidates | true - annotate completion candidates |
|
cider-annotate-completion-function | function to format annotations for completion candidates - takes 2 arguments: abbreviation candidate type (cider-completion-annotations-alist ) and candidate namespace |
|
cider-completion-annotations-alist | Annotation abbreviation for completion candidates (TYPE . ABBREVIATION). TYPE is that returned from the completion backend.ABBREVIATION is a short form of that type. | |
cider-completion-annotations-include-ns | Pass namespace to cider-annotate-completion-function , 'always passed if namespace is available. 'unqualified only pass namespace if not namespace-qualified. |
Clientλ︎
Variables | Default value | Description |
---|---|---|
cider-eval-spinner-type | 'progress-bar |
Type of evaluation spinner (describe-variable spinner-types) |
cider-show-eval-spinner | t |
Show evaluation spinner in mode line |
cider-eval-spinner-delay | 1 |
Time (seconds) elapsed before evaluation spinner shown (default: 1 ) |
cider-enhanced-cljs-completion-p | t |
Enable dynamic cljs completions. Expressions at point evaluated, resulting value are used to compute completions |
cider-print-fn | nil |
Pretty print function: 'pprint clojure.pprint, pr clojure.core/pr , fipp fast idiomatic pprint, puget serialised fipp , zprint zprint library, nil defer to REPL |
cider-print-options | nil |
Options map passed to cider-print-fn , pprint example: '((\"length\" 50) (\"right-margin\" 70)) |
cider-print-quota | (* 1024 1024) |
Hard limit on the number of bytes to return from any printing operation, nil for no limit |
cider-print-buffer-size | (* 4 1024) |
Chunk size (bytes) for print streaming. Smaller chunks, faster feedback and smaller results (only single chunk result can be font-locked) |
cider-filtered-namespaces-regexps | Filter var/symbol/namespace with list of Clojure regex patters (double backslashes as passed through CIDER middleware) |
eldocλ︎
Variables | Default value | Description |
---|---|---|
cider-eldoc-max-num-sexps-to-skip | 30 |
Maximum number of sexps to skip while searching the beginning of current sexp |
cider-eldoc-ns-function | #'identity |
Function returning a ns string to eldoc. Takes namespace name as argument. Convenience functions: cider-abbreviate-ns , and cider-last-ns-segment |
cider-eldoc-max-class-names-to-display | 3 |
Maximum number of classes to display in eldoc string (Java interop forms may have several classes), with "& x more" suffix. nil - all classes are displayed |
cider-eldoc-display-for-symbol-at-point | t |
t display eldoc for symbol at point. nil always display eldoc for first symbol of the sexp. |
cider-eldoc-display-context-dependent-info | nil |
t display context dependent info in the eldoc. CIDER adds expected function arguments based on the current context |
debugλ︎
Variables | Default value | Description |
---|---|---|
cider-debug-prompt | 'overlay |
Position of debug key binding menu. overlay overlay above the current function. minibuffer in minibuffer with return value. t overlay and minibuffer. nil no menu |
cider-debug-use-overlays | t |
Highlight debug information with overlays. Same values as cider-use-overlays |
cider-debug-display-locals | nil |
t local variable display during debugging. Toggled with cider-debug-toggle-locals |
cider-debug-prompt-commands | List of debugger command specs in the format (KEY COMMAND-NAME DISPLAY-NAME?). KEY is a character mapped to the command COMMAND-NAME which is a valid debug command to be passed to the cider-nrepl middleware DISPLAY-NAME is the string displayed in the debugger overlay. If DISPLAY-NAME is nil, that command is hidden from the overlay but still callable. The rest of the commands are displayed in the same order as this list." | |
Overlaysλ︎
Variables | Default value | Description |
---|---|---|
cider-result-use-clojure-font-lock | t |
t interactive eval results are font-locked as Clojure code. |
cider-overlays-use-font-lock | t |
t results overlays are font-locked as Clojure code. nil apply cider-result-overlay-face to the entire overlay instead |
cider-use-overlays | 'both | Display evaluation results with overlays. t overlays determined by cider-result-overlay-position . nil display on the echo area. both display on both places. |
cider-result-overlay-position | 'at-eol |
Display result overlays for inline evaluation and the debugger. If 'at-eol display at the end of the line. 'at-point display at the end of the respective sexp. |
cider-eval-result-prefix | "=>" |
Prefix displayed in minibuffer before a result value |
cider-eval-result-duration | 'command |
Duration (seconds) of CIDER's eval-result overlays. nil overlays last indefinitely. command overlays erased after the next command. See `cider-use-overlays'. |
cider-use-fringe-indicators | t |
Display evaluation indicators on the left fringe. |
Inspectorλ︎
Variables | Default value | Description |
---|---|---|
cider-inspector-page-size | 32 |
Results per page in paginated inspector view, s to interactively change |
cider-inspector-fill-frame | nil |
t cider inspector window fills its frame |
cider-inspector-skip-uninteresting | t |
skips values when navigating with `cider-inspector-*-inspectable-object' commands |
REPL historyλ︎
Variables | Default value | Description |
---|---|---|
cider-repl-history-display-style | 'separated |
'separated display cider-repl-history-separator between entries. 'one-line replace newlines with "\n" |
cider-repl-history-quit-action | 'quit-window |
Action when cider-repl-history-quit called. 'bury-buffer bury cider-repl-history buffer but keep window, 'bury-and-delete-window bury buffer and delete window if more than one window in frame. 'delete-and-restore restore window layout and kill cider-repl-history buffer. 'quit-window restore window layout and bury cider-repl-history. 'kill-and-delete-window kill the cider-repl-history buffer and delete the window on close. |
cider-repl-history-resize-window | nil | Resize the cider-repl-history window to fit its contents. t resize window (MAXIMUM . MINIMUM) for the size of the window. MAXIMUM defaults to the window size chosen by pop-to-buffer'; MINIMUM defaults to window-min-height'. |
cider-repl-history-separator | ";;;;;;;;;;" |
String separating entries in the separated style. See cider-repl-history-display-style |
cider-repl-history-recenter | nil |
t always keep current entry at the top of the window |
cider-repl-history-highlight-current-entry | nil |
t highlight currently selected command history entry |
cider-repl-history-highlight-inserted-item | nil |
t temporarily highlight inserted command history entry. 'solid highlight inserted text for a fixed period of time. 'pulse fade out the highlight gradually. cider-repl-history-inserted-item-face face used for highlighting. |
cider-repl-history-separator-face | 'bold |
Face to highlight cider-repl-history-separator |
cider-repl-history-current-entry-face | 'highlight |
Face to highlight command history current entry |
cider-repl-history-inserted-item-face | 'highlight |
Face to highlight inserted item |
cider-repl-history-maximum-display-length | nil |
Limit the length of displayed items. Command history limited to number of characters. nil means no limit |
cider-repl-history-display-duplicates | t |
t display duplicate items in the command history |
cider-repl-history-display-duplicate-highest | t |
When cider-repl-history-display-duplicates is nil, display most recent duplicate items in command history |
cider-repl-history-text-properties | nil |
If non-nil, maintain text properties of the command history items. |
cider-repl-history-hook | nil |
List of functions to call after `cider-repl-history' |
cider-repl-history-show-preview | nil |
t show preview of inserted text in REPL buffer using item under point where inserted |
xrefλ︎
Variables | Default value | Description |
---|---|---|
cider-xref-actions | '(("display-doc" . cider-doc-lookup) |
Actions applied on symbol found by xref search. First action in list selected as default. If only one action function, its applied automatically |
utilλ︎
Variables | Default value | Description |
---|---|---|
cider-font-lock-max-length | 10000 |
Maximum length of strings to fontify in cider-font-lock-as . nil removes the fontification restriction |
cider-doc-xref-regexp | Regexp to search Clojure vars in doc buffers | |
cider-jdk-src-paths | '("/usr/lib/jvm/openjdk-8/src.zip") |
Source code used by `cider-stacktrace-navigate'. Zip/jar file or extracted directory (recommended). Clojure sources: https://mvnrepository.com/artifact/org.clojure/clojure |
replλ︎
Variables | Default value | Description |
---|---|---|
cider-repl-pop-to-buffer-on-connect | t |
Display and Focus REPL buffer on connect. nil REPL buffer is created but not displayed. display-only REPL buffer displayed but not focused. |
cider-repl-display-in-current-window | nil |
Display REPL buffer in the current window. |
cider-repl-use-pretty-printing | t |
REPL buffer results pretty-printed. cider-toggle-pretty-printing interactively toggles. Specify printer function in cider-pprint-fn . |
cider-repl-use-content-types | nil |
REPL results presented using content-type information. cider-repl-toggle-content-types interactively toggles |
cider-repl-auto-detect-type | t |
Auto-detect REPL type using track-state information. cider-set-repl-type to manually change REPL between Clojure and ClojureScript REPL |
cider-repl-use-clojure-font-lock | t |
t use Clojure mode font-locking for input and result. nil uses cider-repl-input-face and cider-repl-result-face |
cider-repl-require-ns-on-set | nil |
Should the namespace be required before setting it in the REPL |
cider-repl-result-prefix | "" |
Display prefix characters in the REPL before a result value, e.g. "=>" may make results stand out more |
cider-repl-tab-command | 'cider-repl-indent-and-complete-symbol |
Command invoked by TAB key. Default option is cider-repl-indent-and-complete-symbol . indent-for-tab-command to use the default Emacs behavior. |
cider-repl-init-code | (list (cdr (assoc 'clj cider-repl-require-repl-utils-code))) |
Clojure code evaluated when starting a REPL, evaluated with bindings for set! -able vars in place. |
cider-repl-display-help-banner | t |
t help text will be displayed on REPL start |
cider-repl-prompt-function | #'cider-repl-prompt-default |
Function takes a namespace name and returns a prompt string. Convenience functions: cider-repl-prompt-lastname , cider-repl-prompt-abbreviated and cider-repl-prompt-default |
cider-repl-image-margin | 10 |
Margin applied to images in REPL buffer. Single number of pixels as symmetric margin, pair of numbers (x . y) for an arbitrary margin |
cider-locref-regexp-alist | Regular expressions for inline location references. (NAME REGEXP HIGHLIGHT VAR FILE LINE), NAME identifier of the regexp, REGEXP regexp matching a location, HIGHLIGHT sub-expression matching region to highlight on mouse-over, VAR sub-expression giving Clojure VAR to look up. FILE only used when VAR is nil and must be full resource path | |
cider-repl-wrap-history | nil |
t to wrap history when the end is reached |
cider-repl-history-size | 500 |
Maximum number of items to keep in the REPL history |
cider-repl-history-file | nil |
File to save the persistent REPL history |
cider-repl-shortcut-dispatch-char | ?\, |
Character used to distinguish REPL commands from Lisp forms |
cider-repl-buffer-size-limit |
No default | Auto-trimming: Remove older output in the REPL buffer once the set size is reached |
cider.elλ︎
Variables | Default value | Description |
---|---|---|
cider-lein-command | Command used to execute Leiningen | |
cider-lein-global-options | Command global options used to execute Leiningen (e.g. -o for offline). |
|
cider-lein-parameters | Params passed to Leiningen to start an nREPL server via cider-jack-in . |
|
cider-boot-command | Command used to execute Boot | |
cider-boot-global-options | Command global options used to execute Boot (e.g. -c for checkouts). |
|
cider-boot-parameters | Params passed to boot to start an nREPL server via cider-jack-in . |
|
cider-clojure-cli-command | Command execute Clojure CLI deps.edn. If clojure executable is not found on Windows, default to powershell |
|
cider-clojure-cli-global-options | DEPRECATED: use cider-clojure-cli-aliases - Command line options used to execute Clojure CLI |
|
cider-clojure-cli-aliases | Aliases to be added to Clojure CLI command (inserted before :cider/nrepl ) |
|
cider-clojure-cli-parameters | Params to start an nREPL server via cider-jack-in . evaluated using format , with the first argument being the Clojure vector of middleware variables as a string. |
|
cider-shadow-cljs-command | The command used to execute shadow-cljs. By default we favour the project-specific shadow-cljs over the system-wide. | |
cider-shadow-cljs-global-options | Command line options used to execute shadow-cljs (e.g. -v for verbose mode). |
|
cider-shadow-cljs-parameters | Params passed to shadow-cljs to start an nREPL server via cider-jack-in . |
|
cider-gradle-command | Command used to execute Gradle. | |
cider-gradle-global-options | Command line options used to execute Gradle (e.g.: -m for dry run). |
|
cider-gradle-parameters | Params passed to gradle to start an nREPL server via cider-jack-in |
|
cider-jack-in-default | (if (executable-find "clojure") 'clojure-cli 'lein) |
Default tool when cider-jack-in outside a project. The Clojure CLI is is the default. Fallback to Leiningen if Clojure CLI not available |
cider-preferred-build-tool | Unless set, prompt when multiple project configuration files (deps.edn, project.clj, build.boot) | |
cider-allow-jack-in-without-project | 'warn |
'warn prompt to confirm jack-in command when not in a Clojure project. t cider-jack-in' quietly continues. nil cider-jack-in fails. |
cider-known-endpoints | nil |
List of connection endpoints for cider-connect eg. '((\"label\" \"host\" \"port\")) (label optional) |
cider-connected-hook | nil |
List of functions to call when connected to Clojure nREPL server. |
cider-disconnected-hook | nil |
List of functions to call when disconnected from the Clojure nREPL server |
cider-inject-dependencies-at-jack-in | t |
nil do not inject REPL dependencies (i.e. nREPL middleware) for cider-jack-in |
cider-offer-to-open-cljs-app-in-browser | t |
nil do not offer to open ClojureScript apps in a browser on connect |
cider-jack-in-auto-inject-clojure | nil |
nil Clojure version not injected. latest inject cider-latest-clojure-version , minimal inject cider-minimum-clojure-version "1.10.3" explicit version. Using list, first element is artifact ID string, second element is version number |
cider-check-cljs-repl-requirements | t |
Run requirement checks for the cljs REPLs. (only disable if experiencing a faulty check) |
cider-custom-cljs-repl-init-form | nil |
Form to start custom ClojureScript REPL (becomes return value of cider-custom-cljs-repl-init-form function which prompts for init form). Use with .dir-locals.el where it doesn't make sense to register a new ClojureScript REPL type |
cider-default-cljs-repl | nil |
ClojureScript REPL to start for cljs jack-in commands (.dir-locals.el approach recommended) |
cider-edit-jack-in-command | nil |
t allow the user to edit the cider-jack-in-* command line |
cider-infer-remote-nrepl-ports | nil |
t cider will use ssh to try to infer nREPL ports on remote hosts |
aproposλ︎
Variables | Default value | Description |
---|---|---|
cider-apropos-actions | '(("display-doc" . cider-doc-lookup) |
Controls the actions to be applied on the symbol found by an apropos search |
scratchλ︎
Variables | Default value | Description |
---|---|---|
cider-scratch-initial-message | Initial message displayed in new scratch buffers |
nsλ︎
Variables | Default value | Description |
---|---|---|
cider-ns-save-files-on-refresh | 'prompt |
'prompt user prompt to save modified files before refreshing. nil files not saved. t save modified files without confirmation. |
cider-ns-save-files-on-refresh-modes | '(clojure-mode) |
List of modes to determine which modified files are saved before refreshing. A major mode derived from list of the modes. t all modified files on the classpath are saved. |
cider-ns-refresh-show-log-buffer | nil |
nil log buffer will be written to but not displayed automatically (relevant info shown in mini-buffer t log buffer will be displayed every time cider-ns-refresh is called. |
cider-ns-refresh-before-fn | nil |
Clojure namespace-qualified function of zero arity called by cider-ns-refresh before reloading. nil no function called before reloading. Any thrown exception will prevent reloading. |
cider-ns-refresh-after-fn | nil |
Clojure namespace-qualified function of zero arity for cider-ns-refresh to call after reloading. nil no function invoked after reloading. |
macroexpansionλ︎
Variables | Default value | Description |
---|---|---|
cider-macroexpansion-display-namespaces | tidy |
Should full namespace be shown for vars in macroexpansion buffer 'tidy not shown for locally defined or referred vars, 'qualified fully qualified vars shown, 'none no namespace qualification |
cider-macroexpansion-print-metadata | nil |
t include metadata in macroexpansion results |
testλ︎
Variables | Default value | Description |
---|---|---|
cider-test-show-report-on-success | nil |
Show *cider-test-report* buffer for successful tests, nil only generates report when tests fail and subsequent test runs |
cider-auto-select-test-report-buffer | t |
Should *cider-test-report* buffer be active window when it appears |
cider-test-defining-forms | '("deftest" "defspec") |
Forms that define top level of individual unit tests |
cider-test-infer-test-ns | 'cider-test-default-test-ns-fn |
infer test namespace. Defaults to -test postfix on the namespace name |
commonλ︎
Variables | Default value | Description |
---|---|---|
cider-prompt-for-symbol | t |
always prompt, use symbol at point as default. nil use symbol at point, prompt if error. |
cider-special-mode-truncate-lines | t |
CIDER special buffers are line-truncated |
cider-jump-to-pop-to-buffer-actions | window cider-jump-to uses. If target file visible, reuse it. Otherwise open buffer in current window |
|
cider-path-translations | nil | alist of path prefixes to path prefixes. Example: Map project located at \"~/projects/foo\" with src directory of foo mounted at \"/src\" in docker container `((\"/src\" \"~/projects/foo/src\")) |
cider-prefer-local-resources | nil | Prefer local resources to remote (tramp) ones when both are available |
cider-doc.elλ︎
Variables | Default value | Description |
---|---|---|
cider-doc-auto-select-buffer | t |
auto-select the doc popup buffer |
cider-docview-fill-column | fill-column |
Fill column for docstrings in doc buffer |
nrepl-client.elλ︎
Variables | Default value | Description |
---|---|---|
nrepl-connected-hook | nil |
List of functions to call when connecting to the nREPL server. |
nrepl-disconnected-hook | nil |
List of functions to call when disconnected from the nREPL server. |
nrepl-force-ssh-for-remote-hosts | nil |
If non-nil, do not attempt a direct connection for remote hosts. |
nrepl-use-ssh-fallback-for-remote-hosts | nil |
If non-nil, attempt to connect via ssh to remote hosts when unable to connect directly. |
nrepl-sync-request-timeout | 10 |
The number of seconds to wait for a sync response. Setting this to nil disables the timeout functionality. |
nrepl-hide-special-buffers | nil |
In buffer switching commands, some special buffers like the server buffer will be hidden |
nrepl-log-messages | nil |
t log protocol messages to nREPL messages buffer. During debug, allows inspection of communication between Emacs and nREPL server. Logging may impact performance |
nrepl-message-colors | Colors used in the messages buffer. |
stacktraceλ︎
Variables | Default value | Description |
---|---|---|
cider-stacktrace-fill-column | t |
Fill column for error messages in stacktrace display. If nil, messages will not be wrapped. If truthy but non-numeric, `fill-column' will be used. |
cider-stacktrace-default-filters | '(tooling dup) |
Frame types to omit from initial stacktrace display |
cider-stacktrace-suppressed-errors | '() |
Errors that won't make the stacktrace buffer 'pop-over' your active window. The error types are represented as strings |
cider-eval.elλ︎
Variables | Default value | Description |
---|---|---|
cider-show-error-buffer | t |
popup behavior of cider stack traces. 'always , 'except-in-repl , 'only-in-repl , nil no stack trace shown. cider-error-buffer always generated in background |
cider-auto-jump-to-error | t |
automatically jump to error location. 'errors-only don't jump to warnings |
cider-auto-select-error-buffer | t |
auto-select the error popup buffer |
cider-auto-track-ns-form-changes | t |
auto-evaluate ns form of source buffer when changed. nil no evaluation of ns forms |
cider-auto-inspect-after-eval | t |
auto-update inspector buffer after eval when cider-inspect buffer is visible |
cider-save-file-on-load | 'prompt |
prompt to save the file when loading a buffer. t save file without confirmation. nil files are not saved. |
cider-file-loaded-hook | nil |
List of functions to call when a load file has completed |
cider-interactive-eval-output-destination | 'repl-buffer |
destination for stdout and stderr produced from interactive evaluation |
cider-comment-prefix | ";;=>" | prefix to insert before the first line of commented output |
cider-comment-continued-prefix | ";;" | prefix to use on the second and subsequent lines of commented output |
cider-comment-postfix | "" | postfix to be appended after the final line of commented output |
cider-mode.elλ︎
Variables | Default value | Description |
---|---|---|
cider-mode-line-show-connection | t |
show REPL connection details in modeline |
cider-mode-line | display current connection | Mode line lighter to display cider status, nil disables status. variable is a mode line template as in mode-line-format . Info Node (elisp)Mode Line Format for mode line templates. |
cider-switch-to-repl-after-insert-p | t |
Switch to REPL buffer after inserting form to the REPL |
cider-switch-to-repl-on-insert | t |
Switch to REPL buffer when inserting form into the REPL |
cider-invert-insert-eval-p | nil |
nil insert form in REPL buffer, t insert and eval form in REPL buffer |
cider-dynamic-indentation | t |
Enhance clojure-mode indentation using runtime nformation, eg. ":style/indent" metadata |
cider-font-lock-dynamically | '(macro core deprecated) |
Apply syntax highlighting to vars defined in active nREPL connection, in addition to clojure-mode static font-lock. Value is list of symbols: macro any defined macro gets font-lock-keyword-face , function defined function gets the font-lock-function-face , var non-local var gets the font-lock-variable-name-face , deprecated deprecated var gets the cider-deprecated-face , core symbol from clojure.core (face depends on type), t font lock as much as possible |
cider-font-lock-reader-conditionals | t |
Apply font-locking to unused reader conditional expressions depending on the buffer CIDER connection type |
cider-use-tooltips | t |
t displays mouse-over tooltips and `help-echo' mechanism |
cider-connection.elλ︎
Variables | Default value | Description |
---|---|---|
cider-session-name-template | "%J:%h:%p" |
String format for session names - describe cider-format-connection-params for available formats |
cider-connection-message-fn | #'cider-random-words-of-inspiration |
generate the message displayed on connect - nil no message, cider-random-tip random tip on using CIDER |
cider-redirect-server-output-to-repl | t |
Should nREPL server output be redirected to the REPL buffer. t output sent to nrepl-server buffer and REPL buffer. n only nrepl-server buffer |
cider-auto-mode | t |
Should all Clojure buffers be automatically set to cider major mode |