是否有任何Lisp語言的源代碼美化,特別是Clojure。Lisp的源代碼美化(Common Lisp,Scheme,Clojure)
我知道有許多像C/C++(的astyle,Uncrustify等)
我不能縫找到任何的Lisp的語言的語言。
我的代碼是一個爛攤子許多長行的這種語言像下面
(defn check-if-installed[x] (:exit(sh "sh" "-c" (str "command -v " x " >/dev/null 2>&1 || { echo >&2 \"\"; exit 1; }"))))
或
(def Open-Action (action :handler (fn [e] (choose-file :type :open :selection-mode :files-only :dir ListDir :success-fn (fn [fc file](setup-list file)))) :name "Open" :key "menu O" :tip "Open spelling list"))
這是可怕的
它會是不錯的一個美化的是可以像這樣格式化
(if (= a something)
(if (= b otherthing)
(foo)))
+1'在正確的位置插入換行符很難,因爲換行的選擇與您希望人們如何閱讀代碼有很大關係' –