@cospaia/prettier-plugin-clojure
An (almost) indentation-only, non-configurable, Prettier Plugin for Clojure and ClojureScript (and any sufficiently similar implementations).
The plugin really is basic. It will format the code using cljfmt defaults, without letting you configure anything. This means that mostly indentation will be applied, but there is also some folding of the bracket trail and trimming of whitespace inside the brackets, going on.
Is that really useful? I need it for a project, so, yes, at least to someone.
Using it
In the project you want to use it, you first:
npm i prettier @cospaia/prettier-plugin-clojure
Then you can do things like:
$ npx prettier <clojure-file | markdown-file-w-fenced-clojure-block>
e.g:
$ npx prettier ./test-data/some_code.clj
$ npx prettier ./test-data/some-fenced-code.md
Testing it
In this project:
npm i
npm run builddist
npx prettier --plugin . ./test-data/some_code.clj
npx prettier --plugin . ./test-data/some-fenced-code.md
See also the test project.
Author
Peter Strömberg, aka PEZ
Built with
LICENSE
MIT