-
Notifications
You must be signed in to change notification settings - Fork 169
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
How to make ocamlformat use .ocamlformat
file from a specific directory?
#573
Comments
Yes, using And thanks for the atom-beautify integration! |
Thanks, that worked great! I've added this change to my latest atom-beautify PR: Glavin001/atom-beautify#2257. |
@utkarshkukreti I failed to mention this before, but please feel free to send a PR with an addition to the README.md file that points to your atom-beautify integration. |
I hit this issue today, and ended up using |
Context
I wrote the initial ocamlformat <-> atom-beautify integration a while back. I'm trying to make it support reading
.ocamlformat
config from the project folder.Problem
atom-beautify (with beautify on save mode) formats the file before it's saved to disk. The implementation above saves the contents of the file to a temporary file, calls
ocamlformat
binary on it, and then sends the output back to the editor before the file is saved. This method does not read the correct.ocamlformat
file because the temporary file is not stored in the same directory as the original file.Question
Is it possible to specify which directory to scan for the
.ocamlformat
file while specifying a different file as input?I tried passing
--root
but it doesn't work because passing a root argument presumably enables--disable-outside-detected-project
automatically:The text was updated successfully, but these errors were encountered: