Liking cljdoc? Tell your friends :D

select-nrepl

Text-object support for your editor as nREPL middleware.

Installing

Add the following to your profiles.clj (cider-nrepl isn’t strictly necessary, but if you want this, you probably want that, too):

profiles.clj
{:user {:plugins [[cider/cider-nrepl "0.21.0"]]
        :dependencies [[net.eraserhead/select-nrepl "0.1.0"]]
        :repl-options {:nrepl-middleware [select-nrepl.core/wrap-select]}}}

This will add the "select" op to nrepl. See the operation’s descriptor for more information. You will need some editor scripting to use this operation.

Demo

235120
Figure 1. Selecting elements
235116
Figure 2. Selecting forms
235118
Figure 3. Selecting toplevels

Kakoune

For intergrating with Kakoune, install rep and see this example.

Note on Cursor Positions

In order to support as many editors as possible, columns are zero-based caret offsets, meaning that they are not actually columns but specify the location of a caret in between columns. Zero is before the first character on a line, and one is just after the first character.

License

Copyright © 2019 Jason M. Felice

This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0.

This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version, with the GNU Classpath Exception which is available at https://www.gnu.org/software/classpath/license.html.

Can you improve this documentation?Edit on GitHub

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

× close