zprint
zprint copied to clipboard
Is there an option to make :refer start on a new line?
Sometimes, the namespace itself is quite long, which causes the :refer content to appear far to the right.
(:require
[server.app.web.routes.xdm.basic-info :as xxx
:refer [get-emergency-plans get-hotline-12345
get-population-details
get-wx-official-account-events]]
[server.app.web.routes.xdm.xdm-device :refer [find-device-by-id]])
In such cases, I'd like :refer to start on a new line.
(ns server.app.web.routes.admin.xdm.basic-info
(:require
[server.app.web.routes.xdm.basic-info :as xxx
:refer [get-emergency-plans get-hotline-12345 get-population-details
get-wx-official-account-events]]
[server.app.web.routes.xdm.xdm-device :refer [find-device-by-id]]))
Sorry it took me so long to respond.
This is a tough thing to do. I can't easily approximate your desired result, but I can offer something that might be better than what you are getting (even though it isn't exactly what you asked):
(czprint i338 {:parse-string? true})
(:require [server.app.web.routes.xdm.basic-info :as xxx :refer
[get-emergency-plans get-hotline-12345 get-population-details
get-wx-official-account-events]]
[server.app.web.routes.xdm.xdm-device :refer [find-device-by-id]])
(czprint i338 {:parse-string? true :style :ns-justify})
(:require
[server.app.web.routes.xdm.basic-info :as xxx
:refer [get-emergency-plans
get-hotline-12345
get-population-details
get-wx-official-account-events]]
[server.app.web.routes.xdm.xdm-device :refer [find-device-by-id]])
(czprint i338 {:parse-string? true :vector {:option-fn (fn ([] "new-fn") ([opts n exprs] {:vector {:fn-format :pair-fn} :next-inner {:vector {:fn-format nil :option-fn nil}}}))}})
(:require [server.app.web.routes.xdm.basic-info
:as xxx
:refer [get-emergency-plans get-hotline-12345 get-population-details
get-wx-official-account-events]]
[server.app.web.routes.xdm.xdm-device :refer [find-device-by-id]])
nil
zprint.core=>