File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 337337(defmethod indenter-fn :block [sym context [_ idx]]
338338 (fn [zloc] (block-indent zloc sym idx context)))
339339
340+ (defmethod indenter-fn :default [sym context [_]]
341+ (fn [zloc]
342+ (when (form-matches-key? zloc sym context)
343+ (list-indent zloc context))))
344+
340345(defn- make-indenter [[key opts] context]
341346 (apply some-fn (map (partial indenter-fn key context) opts)))
342347
Original file line number Diff line number Diff line change 12601260 [" {:one two #_comment"
12611261 " :three four}" ]
12621262 {:split-keypairs-over-multiple-lines? true }))
1263+ (is (reformats-to?
1264+ [" (with-timezone (java.time.OffsetDateTime.)"
1265+ " \" US/Pacific\" )" ]
1266+ [" (with-timezone (java.time.OffsetDateTime.)"
1267+ " \" US/Pacific\" )" ]
1268+ {:indents {#"^with-" [[:inner 0 ]]
1269+ 'with-timezone [[:default ]]}})
1270+ " Should be able to override fuzzy indent rules for with- and explicitly specify :default indentation" )
12631271 #? (:clj
12641272 (is (reformats-to?
12651273 [" (ns foo.bar"
You can’t perform that action at this time.
0 commit comments