-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
respect custom indent rules #24
Comments
I'll look into this. Whether or not it's reasonably feasible depends largely on whether or not |
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 |
vim-cljfmt uses a REPL connection to call reformat-string and reformat vim buffers on command. Unfortunately, it doesn't respect indent options specified in project.clj/profiles.clj. As mentioned in venantius/vim-cljfmt#24 the author is reluctant to parse these files manually. By injecting indent settings into cljfmt.core at REPL startup, we can enable vim-cljfmt to easily respect these settings.
vim-cljfmt uses a REPL connection to call reformat-string and reformat vim buffers on command. Unfortunately, it doesn't respect indent options specified in project.clj/profiles.clj. As mentioned in venantius/vim-cljfmt#24 the author is reluctant to parse these files manually. By injecting indent settings into cljfmt.core at REPL startup, we can enable vim-cljfmt to easily respect these settings.
vim-cljfmt uses a REPL connection to call reformat-string and reformat vim buffers on command. Unfortunately, it doesn't respect indent options specified in project.clj/profiles.clj. As mentioned in venantius/vim-cljfmt#24 the author is reluctant to parse these files manually. By injecting indent settings into cljfmt.core at REPL startup, we can enable vim-cljfmt to easily respect these settings.
Resolve venantius#24
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. |
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
:and when I run
:Cljfmt
it gets ignored.The text was updated successfully, but these errors were encountered: