A vector of all CIDER middleware.
A vector of all CIDER middleware.
(def-wrapper name handler-fn & [trigger-it descriptor])
Define delayed middleware (e.g. wrap-xyz).
handler-fn
is an unquoted name of a function that takes two arguments -
handler
and message
. It is called only when certain conditions are met as
expressed by the optional trigger-it
argument. trigger-it
can be either a
function or a set of ops (strings). When a function, it must take a msg
and
return truthy value when handler-fn
should run. When trigger-it
is missing,
handle-fn
is called when :op of msg
is one of keys of the :handles slot of
the descriptor
. When trigger-it
is a set it should contain extra ops,
besides those in :handles slot, on which handle-fn
is
triggered. descriptor
is passed directly to the nREPLs set-descriptor!
.
Define delayed middleware (e.g. wrap-xyz). `handler-fn` is an unquoted name of a function that takes two arguments - `handler` and `message`. It is called only when certain conditions are met as expressed by the optional `trigger-it` argument. `trigger-it` can be either a function or a set of ops (strings). When a function, it must take a `msg` and return truthy value when `handler-fn` should run. When `trigger-it` is missing, `handle-fn` is called when :op of `msg` is one of keys of the :handles slot of the `descriptor`. When `trigger-it` is a set it should contain extra ops, besides those in :handles slot, on which `handle-fn` is triggered. `descriptor` is passed directly to the nREPLs `set-descriptor!`.
Map of delay
s holding deferred middleware handlers.
Map of `delay`s holding deferred middleware handlers.
Set of nREPL ops that can lead to code being evaluated.
Set of nREPL ops that can lead to code being evaluated.
Lock used to inhibit concurrent require
of the middleware namespaces.
Clojure seem to have issues with concurrent loading of transitive
dependencies. The issue is extremely hard to reproduce. For the context see
https://github.com/clojure-emacs/cider/issues/2092 and
https://github.com/clojure-emacs/cider/pull/2078.
Lock used to inhibit concurrent `require` of the middleware namespaces. Clojure seem to have issues with concurrent loading of transitive dependencies. The issue is extremely hard to reproduce. For the context see https://github.com/clojure-emacs/cider/issues/2092 and https://github.com/clojure-emacs/cider/pull/2078.
(run-deferred-handler fn-name handler msg)
Make a delay out of fn-name
and place it in delayed-handlers
atom at compile time.
Require and invoke the delay at run-time with arguments handler
and
msg
. fn-name
must be a namespaced symbol (unquoted).
Make a delay out of `fn-name` and place it in `delayed-handlers` atom at compile time. Require and invoke the delay at run-time with arguments `handler` and `msg`. `fn-name` must be a namespaced symbol (unquoted).
(wrap-apropos h)
Middleware that handles apropos requests
Middleware that handles apropos requests
(wrap-classpath h)
Middleware that provides the java classpath.
Middleware that provides the java classpath.
(wrap-complete h)
Middleware providing completion support.
Middleware providing completion support.
(wrap-content-type h)
Middleware that adds content-type
annotations to the result of the the eval op.
Middleware that adds `content-type` annotations to the result of the the eval op.
(wrap-debug h)
Provide instrumentation and debugging functionality.
Provide instrumentation and debugging functionality.
(wrap-format h)
Middleware providing support for formatting Clojure code and EDN data.
Middleware providing support for formatting Clojure code and EDN data.
(wrap-inspect h)
Add a value inspector option to the eval op. Passing a non-nil value
in the :inspect
slot will cause the last value returned by eval to
be inspected. Returns a string representation of the resulting
inspector's state in the :value
slot.
Add a value inspector option to the eval op. Passing a non-nil value in the `:inspect` slot will cause the last value returned by eval to be inspected. Returns a string representation of the resulting inspector's state in the `:value` slot.
(wrap-macroexpand h)
Macroexpansion middleware.
Macroexpansion middleware.
(wrap-ns h)
Provide ns listing and browsing functionality.
Provide ns listing and browsing functionality.
(wrap-pprint h)
Middleware that adds a pretty-printing option to the eval op.
Passing a non-nil value in the :pprint
slot will cause eval to call
clojure.pprint/pprint on its result. The :right-margin
slot can be
used to bind *clojure.pprint/*print-right-margin*
during the
evaluation. (N.B., the encoding used to transmit the request map
msg
across the wire will convert presumably falsey values into
truthy values. If you don't want something to be pretty printed,
remove the :pprint
key entirely from your request map, don't try
and set the value to nil, false, or string representations of the
above).
Middleware that adds a pretty-printing option to the eval op. Passing a non-nil value in the `:pprint` slot will cause eval to call clojure.pprint/pprint on its result. The `:right-margin` slot can be used to bind `*clojure.pprint/*print-right-margin*` during the evaluation. (N.B., the encoding used to transmit the request map `msg` across the wire will convert presumably falsey values into truthy values. If you don't want something to be pretty printed, remove the `:pprint` key entirely from your request map, don't try and set the value to nil, false, or string representations of the above).
(wrap-pprint-fn h)
Middleware that provides a common interface for other middlewares that need to perform customisable pretty-printing.
A namespace-qualified name of the function to be used for printing can
be optionally passed in the :pprint-fn
slot, the default value being
clojure.pprint/pprint
.
The :pprint-fn
slot will be replaced with a closure that calls the
given printing function with *print-length*
, *print-level*
,
*print-meta*
, and clojure.pprint/*print-right-margin*
bound to the
values of the :print-length
, :print-level
, :print-meta
, and
:print-right-margin
slots respectively.
Middlewares further down the stack can then look up the :pprint-fn
slot and call it where necessary.
Middleware that provides a common interface for other middlewares that need to perform customisable pretty-printing. A namespace-qualified name of the function to be used for printing can be optionally passed in the `:pprint-fn` slot, the default value being `clojure.pprint/pprint`. The `:pprint-fn` slot will be replaced with a closure that calls the given printing function with `*print-length*`, `*print-level*`, `*print-meta*`, and `clojure.pprint/*print-right-margin*` bound to the values of the `:print-length`, `:print-level`, `:print-meta`, and `:print-right-margin` slots respectively. Middlewares further down the stack can then look up the `:pprint-fn` slot and call it where necessary.
Common pprint arguments for CIDER's middleware.
Common pprint arguments for CIDER's middleware.
(wrap-profile h)
Middleware that provides supports Profiling based on https://github.com/thunknyc/profile
Middleware that provides supports Profiling based on https://github.com/thunknyc/profile
(wrap-resource h)
Middleware that provides the path to resource.
Middleware that provides the path to resource.
(wrap-slurp h)
Middleware that handles slurp requests.
Middleware that handles slurp requests.
(wrap-spec h)
Middleware that provides clojure.spec
browsing functionality.
Middleware that provides `clojure.spec` browsing functionality.
(wrap-stacktrace h)
Middleware that handles stacktrace requests, sending cause and stack frame info for the most recent exception.
Middleware that handles stacktrace requests, sending cause and stack frame info for the most recent exception.
(wrap-test h)
Middleware that handles testing requests.
Middleware that handles testing requests.
(wrap-trace h)
Toggle tracing of a given var.
Toggle tracing of a given var.
(wrap-tracker h)
Enhances the eval
op by notifying the client of the current REPL
state. Currently, only the REPL type (Clojure or ClojureScript) is
informed.
Enhances the `eval` op by notifying the client of the current REPL state. Currently, only the REPL type (Clojure or ClojureScript) is informed.
(wrap-undef h)
Middleware to undefine a symbol in a namespace.
Middleware to undefine a symbol in a namespace.
(wrap-version h)
Provides CIDER-nREPL version information.
Provides CIDER-nREPL version information.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close