Fork me on GitHub
#emacs
<
2017-12-08
>
New To Clojure11:12:07

Is there a way to automatically reformat clj buffer in CIDER?

solf12:12:02

M-x cider-format-buffer

bozhidar17:12:29

@dromar56 Another way would be to just get this from the var-info middleware.

solf18:12:28

Thanks @bozhidar, I didn't knew about that

adamvh21:12:11

ha, thanks for copying my question already

ag21:12:49

@adamvh lein project?

adamvh21:12:07

correct, i type cider-jack-in-clojurescript while editing a .cljs file inside a lein project (but not project.clj itself if that matters). i believe project.clj is set up correctly (with piggieback etc).

adamvh21:12:09

to be more specific about my situation, i'm just cloning the Fulcro repo from github and trying to start repls

ag21:12:01

(setq cider-cljs-lein-repl
      "(do (require 'figwheel-sidecar.repl-api)
           (figwheel-sidecar.repl-api/start-figwheel!)
           (figwheel-sidecar.repl-api/cljs-repl))")

ag21:12:51

better way is to create .dir-locals.el and set the values there. this is what we use in our project: .dir-locals.el

((nil . ((cider-cljs-lein-repl .
          "(do (require 'figwheel-sidecar.repl-api)
               (require 'integrant.repl)
               (integrant.repl/go)
               (figwheel-sidecar.repl-api/cljs-repl))"))))

adamvh22:12:36

so, integrant fails for me with some error about a system-prep function but, if i use the first version, i find myself with 2 eminently functional repls, so thanks!

ag00:12:32

you don't need to use integrant. it's just an example how we set the vars. and we use integrant