Fork me on GitHub
#spacemacs
<
2018-12-10
>
tbrooke15:12:43

I saw a video where they automatically inserted the ns require with Cursive (ie put str/ and it inserts [clojure.string :as str] )- I saw you can do it with clj-refactor-- spacemacs docs says clj refactor is included in the layer and has code to insert in your .lein/profiles.clj - but after I added it the repl won’t start — Also don’t I want to migrate to tools.dep anyway? Any thoughts on tools.dep with Spacemacs

practicalli-johnny11:12:28

@U054219BT clj-refactor is now an optional package in the Spacemacs Clojure layer, as its features are migrating into clojure-mode package. You have not needed to add anything to .lein/profiles since version 0.10 of Cider. To add clj-refactor for any Clojure project, edit your .spacemacs file and in the dotspacemaca/layers section, replace clojure with

(clojure :variables
              clojure-enable-clj-refactor t)

practicalli-johnny11:12:01

I am assuming you mean this function from clj-refactor, which has a keybinding of , r a r in Spacemacs https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-add-require-to-ns

tbrooke14:12:07

@U05254DQM Thank you that was exactly it — somehow I misread that clj-refactor was automatically included in the Clojure layer but it isn’t 👏

practicalli-johnny15:12:35

It's is a recent change, in the last couple of months on develop