|This page is very incomplete and a work in progress.|
This part of the documentation aims to guide you in the process of implementing nREPL middleware. We’ll cover the basics, the best practices and some of the common pitfalls you might encounter.
|This page complements the middleware design documentation. Make sure you’re familiar with it before proceeding to implement any middleware.|
In this section we’ll go over some of the best practices for implementing nREPL middleware.
It’s recommended to prefix middleware names with
wrap - e.g.
This naming convention came from Ring middleware,
which was a major influence on the design of nREPL.
nREPL itself breaks this convention with names like
When it comes to ops, ideally their names should be verbs - e.g.
Related ops can be grouped under some common prefix - e.g.
It’s also prudent to prefix op names with some "namespace"-like prefix to avoid conflicts between
different middlewares - e.g.
That’s the reason why nREPL’s completion op is named