This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-10
Channels
- # announcements (4)
- # beginners (111)
- # boot (34)
- # cider (67)
- # cljdoc (10)
- # clojure (90)
- # clojure-dev (37)
- # clojure-europe (3)
- # clojure-gamedev (3)
- # clojure-italy (18)
- # clojure-losangeles (2)
- # clojure-nl (27)
- # clojure-spec (24)
- # clojure-uk (59)
- # clojurescript (41)
- # cursive (32)
- # datomic (31)
- # emacs (21)
- # figwheel (1)
- # figwheel-main (2)
- # fulcro (43)
- # graalvm (6)
- # graphql (3)
- # jobs-discuss (3)
- # kaocha (1)
- # nyc (1)
- # off-topic (22)
- # pathom (10)
- # pedestal (11)
- # re-frame (9)
- # reitit (17)
- # shadow-cljs (15)
- # spacemacs (13)
- # sql (6)
- # testing (5)
- # tools-deps (3)
- # vim (13)
- # yada (1)
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.
I also have it set up in ~/.lein/profiles.clj
I'm also having issues getting the symbol refactor to work in a clj project. That's the error I get.
I'm still a very new to emacs & spacemacs so I'm probably just doing something dumb. I'm just not sure what
I would like for each new line to just be two spaces, but it seems to be doing something strange
If you put a new line after dom/div
then it should indent 2 spaces. Its aligning the arguments.
i think it's following the clojure style guide @njj https://github.com/bbatsov/clojure-style-guide#source-code-layout--organization
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)
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.