Is there an online tool to auto-indent and format Clojure code like there are many for JSON?

后端 未结 4 739
温柔的废话
温柔的废话 2021-02-18 23:11

There are a lot of tools online that take a JSON text and show you formatted and well indented format of the same.

Some go even further and make a nice tree-like structu

4条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-18 23:57

    I'm not aware of any online services which do this, but there are Clojure libraries which serve this purpose. clojure.pprint comes with Clojure (the key function is clojure.pprint/pprint); Brandon Bloom's fipp is a significantly faster alternative.

    Note that neither of these is particularly likely to format code as a programmer armed with Emacs would; they're close enough to be useful, however, and for literal data (not intended to be interpreted as code) may well match human standards.

提交回复
热议问题