Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

How to stop automatically format the file when saving the file? #253

Open
beyondpie opened this issue Mar 2, 2024 · 0 comments
Open

How to stop automatically format the file when saving the file? #253

beyondpie opened this issue Mar 2, 2024 · 0 comments

Comments

@beyondpie
Copy link

Hi there,

This is really a fantastic package, and I am now using it everyday. One problem I now have is that, once I open the format-all mode, it will automatically format the file every time when I save the file. I hope to only format the file when I need.

I notice that the hook format-all--buffer-from-hook is registered into before-save-hook, and I can remove that function out of before-save-hook. It works as I expected. But when I start to format the code using format-all-buffer function, it seems that format-all--buffer-from-hook again is registered into before-save-hook.

Do you know how can we remove or allow the user to control this behavior? For me, I think, I can add one add-advice function to format-all-buffer, but not sure if there is some official method?

Thanks!
Songpeng

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant