Fork me on GitHub
#spacemacs
<
2019-05-10
>
caleb.macdonaldblack11:05:30

I'm trying to do a symbol refactor. I'm in a cljs file using shadow-cljs. I have successfully connected with cider-jack-n-clojurescript. When I try to do this I get a message that says the refactor-nrepl middleware is not available. I have added it (`[refactor-nrepl "2.4.0"]) to .shadow-cljs/config.edn and to shadow-cljs.edn and neither work.

caleb.macdonaldblack11:05:47

I also have it set up in ~/.lein/profiles.clj

caleb.macdonaldblack12:05:00

I'm also having issues getting the symbol refactor to work in a clj project. That's the error I get.

caleb.macdonaldblack12:05:30

I'm still a very new to emacs & spacemacs so I'm probably just doing something dumb. I'm just not sure what

exit214:05:44

Does anyone know how to get spacemacs not to indent like this?

exit214:05:19

I would like for each new line to just be two spaces, but it seems to be doing something strange

practicalli-johnny23:05:50

If you put a new line after dom/div then it should indent 2 spaces. Its aligning the arguments.

exit214:05:17

ah yes that makes sense

spfeiffer17:05:29

@njj We had tat here just yesterday, what a coincidence:

👍 4
practicalli-johnny23:05:57

I use automatic aggressive indenting because I like arguments to line up, especially let, pairs of values in vectors and maps, etc. If you have these enable then it maybe doing too much indenting for you.

;; Indentation of function forms
  ;; 
  (setq clojure-indent-style 'align-arguments)
  ;;
  ;; Vertically align s-expressions
  ;; 
  (setq clojure-align-forms-automatically t)
  ;;
  ;; Auto-indent code automatically
  ;; 
  (add-hook 'clojure-mode-hook #'aggressive-indent-mode)

👍 4
practicalli-johnny23:05:13

maybe looking at clojure-indent-style will give more insight if you want to change indenting. I am happy enough letting Spacemacs / CIDER drive the indenting. If the shape of the code looks wrong, it’s often because I’ve made a typo or bug.