This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-09-18
Channels
- # bangalore-clj (1)
- # beginners (36)
- # boot (119)
- # braid-chat (16)
- # cider (14)
- # cljs-dev (34)
- # cljsrn (7)
- # clojars (9)
- # clojure (91)
- # clojure-austin (1)
- # clojure-bangladesh (1)
- # clojure-dusseldorf (5)
- # clojure-israel (1)
- # clojure-russia (3)
- # clojure-spec (6)
- # clojure-uk (7)
- # clojurescript (11)
- # community-development (1)
- # core-async (5)
- # cursive (6)
- # datomic (11)
- # dirac (12)
- # funcool (24)
- # leiningen (5)
- # luminus (5)
- # off-topic (2)
- # om (69)
- # om-next (16)
- # overtone (4)
- # perun (19)
- # re-frame (23)
- # reagent (38)
- # specter (7)
- # uncomplicate (9)
- # yada (4)
In clojure-mode is there a way for me to set one specific form to have an indentation where the args are vertically aligned? I want the arguments to be aligned just for and
and or
.
that’s what I want but I only see examples define-clojure-indent
taking an int number of spaces to ident
@adamfrey there is clojure-align
in clojure-mode
@richiardiandrea what is clojure-align
?
(if I understood your request correctly) it aligns forms vertically
yes, but I don’t want to align all forms vertically by default. I want all my function parameters to indent two spaces by default (which I already have set up and working). I only want to override that setting for two forms: and
and or
I feel like I should be able to do that with define-clojure-indent
, but I can’t find an example of overriding just one form to make the params align.
oh so I think definitely define-clojure-indent
should help
@richiardiandrea thanks for the link! it made me realize that I misunderstood what the integer in define-clojure-indent
meant. I thought it was the number of spaces to indent, but actually it is the amount of parameters to treat as “special”. So to get what I want I added this:
(define-clojure-indent
(or 0)
(and 0))
glad it helped!