respect custom indent rules
it'd be rad to have formatting from inside vim respect custom indent rules!
right now I have this set up in my project.clj:
:cljfmt {:indents {my-fancy-macro [[:inner 0]]}}
and when I run :Cljfmt it gets ignored.
I'll look into this. Whether or not it's reasonably feasible depends largely on whether or not lein-cljfmt injects your preferences into a namespace var that's accessible at REPL / runtime; having to parse your project.clj from vim-cljfmt directly is possible but it's a vastly less preferable approach.
I'm facing the same issue, is there any solution? I have a few custom rules for cljfmt and I can't really use this plugin.
@raycheung unfortunately there is no solution at present. I spent a few hours today trying to get a viable PR put together but wasn't able to get all the way there and don't have the time to keep working on it.
If you're interested, I've pushed up my work in a commit here -- this is really close to being able to give you a runtime-accessible var with your project's cljfmt options, but unfortunately it tries to eval the symbols loaded in from the respective resource files ("cljfmt/indents/clojure.clj", etc.) and fails when it can't lookup defroutes, for instance. If you were able to get this over the line and merged into Cljfmt upstream it would be pretty trivial to patch vim-cljfmt to do the same.
I no longer have this problem in my workflow since I have vim pointing to https://github.com/michaelblume/vim-cljfmt and my profiles.clj pointing to https://github.com/MichaelBlume/lein-cljfmt-editor. So far I've had no luck getting this code merged, but it's quite usable where it is.