Liking cljdoc? Tell your friends :D

cider.nrepl

Middleware descriptors and related utility functions.

While normally middleware descriptors live alongside middleware definitions, cider-nrepl separates those. The rationale behind this is to avoid loading each middleware definition until its first usage. For this purpose we're defining each middleware as a wrapper that defers the loading of the actual middleware.

Middleware descriptors and related utility functions.

While normally middleware descriptors live alongside middleware
definitions, cider-nrepl separates those. The rationale behind this
is to avoid loading each middleware definition until its first usage.
For this purpose we're defining each middleware as a wrapper that
defers the loading of the actual middleware.
raw docstring

cider-middlewareclj

source

cider-nrepl-handlerclj

CIDER's nREPL handler.

CIDER's nREPL handler.
sourceraw docstring

def-wrappercljmacro

(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!`.
sourceraw docstring

delayed-handlersclj

Map of delays holding deferred middleware handlers.

Map of `delay`s holding deferred middleware handlers.
sourceraw docstring

ops-that-can-evalclj

Set of nREPL ops that can lead to code being evaluated.

Set of nREPL ops that can lead to code being evaluated.
sourceraw docstring

require-lockclj

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.
sourceraw docstring

run-deferred-handlercljmacro

(run-deferred-handler fn-name handler msg)

Require and invoke the handler delay at run-time with arguments handler and msg. fn-name must be a namespaced symbol (unquoted).

Require and invoke the handler delay at run-time with arguments `handler` and `msg`.
`fn-name` must be a namespaced symbol (unquoted).
sourceraw docstring

wrap-aproposclj

(wrap-apropos h)

Middleware that handles apropos requests

Middleware that handles apropos requests
sourceraw docstring

wrap-classpathclj

(wrap-classpath h)

Middleware that provides the java classpath.

Middleware that provides the java classpath.
sourceraw docstring

wrap-clojuredocsclj

(wrap-clojuredocs h)

Middleware to find a documents from ClojureDocs.

Middleware to find a documents from ClojureDocs.
sourceraw docstring

wrap-completeclj

(wrap-complete h)

Middleware providing completion support.

Middleware providing completion support.
sourceraw docstring

wrap-content-typeclj

(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.
sourceraw docstring

wrap-debugclj

(wrap-debug h)

Provide instrumentation and debugging functionality.

Provide instrumentation and debugging functionality.
sourceraw docstring

wrap-enlightenclj

(wrap-enlighten h)
source

wrap-formatclj

(wrap-format h)

Middleware providing support for formatting Clojure code and EDN data.

Middleware providing support for formatting Clojure code and EDN data.
sourceraw docstring

wrap-infoclj

(wrap-info h)
source

wrap-inspectclj

(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.
sourceraw docstring

wrap-macroexpandclj

(wrap-macroexpand h)

Macroexpansion middleware.

Macroexpansion middleware.
sourceraw docstring

wrap-nsclj

(wrap-ns h)

Provide ns listing and browsing functionality.

Provide ns listing and browsing functionality.
sourceraw docstring

wrap-outclj

(wrap-out h)
source

wrap-profileclj

(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
sourceraw docstring

wrap-refreshclj

(wrap-refresh h)

Refresh middleware.

Refresh middleware.
sourceraw docstring

wrap-resourceclj

(wrap-resource h)

Middleware that provides the path to resource.

Middleware that provides the path to resource.
sourceraw docstring

wrap-slurpclj

(wrap-slurp h)

Middleware that handles slurp requests.

Middleware that handles slurp requests.
sourceraw docstring

wrap-specclj

(wrap-spec h)

Middleware that provides clojure.spec browsing functionality.

Middleware that provides `clojure.spec` browsing functionality.
sourceraw docstring

wrap-stacktraceclj

(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.
sourceraw docstring

wrap-testclj

(wrap-test h)

Middleware that handles testing requests.

Middleware that handles testing requests.
sourceraw docstring

wrap-traceclj

(wrap-trace h)

Toggle tracing of a given var.

Toggle tracing of a given var.
sourceraw docstring

wrap-trackerclj

(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.
sourceraw docstring

wrap-undefclj

(wrap-undef h)

Middleware to undefine a symbol in a namespace.

Middleware to undefine a symbol in a namespace.
sourceraw docstring

wrap-versionclj

(wrap-version h)

Provides CIDER-nREPL version information.

Provides CIDER-nREPL version information.
sourceraw docstring

wrap-xrefclj

(wrap-xref h)

Middleware that provides find references functionality.

Middleware that provides find references functionality.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close