Skip to content
Lars Andersen expez@expez.com edited this page Jun 10, 2015 · 89 revisions

Available refactorings

These functions are available, but used so rarely they're not given a keybinding default:

  • cljr-reify-to-defercord replace a call to reify with a call to a defrecord constructor.
  • cljr-reload-configuration Resubmit any configuration changes to the middleware.
  • cljr-version Display version information for clj-refactor and the refactor-nrepl middleware.

Misc features

Automatic insertion of namespace declaration

When you open a blank .clj-file, clj-refactor inserts the namespace declaration for you.

It will also add the relevant :use clauses in test files, normally using clojure.test, but if you're depending on midje or expectations in your project.clj it uses that instead.

Prefer to insert your own ns-declarations? Then:

(setq clj-add-ns-to-blank-clj-files nil)

Tweaks to paredit

With clj-refactor enabled, any keybindings for paredit-raise-sexp is replaced by cljr-raise-sexp which does the same thing - except it also removes any # in front of function literals and sets.

Customization

To take a look at the available settings do: M-x customize-group <RET> cljr <RET>

Clone this wiki locally