-
-
Notifications
You must be signed in to change notification settings - Fork 292
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
Make JuliaFormatter ignore bind macro in notebook file #3072
Conversation
Nice! Can you add a comment to the code that links to https://domluna.github.io/JuliaFormatter.jl/stable/#Turn-off/on-formatting ? |
@fonsp Done! |
9775b4a
to
27d9e7b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to verify, did you create a new file using this Pluto version, format an old file and a new file with JF and check that the new one does not change?
Good call. I had done quick testing on my notebook that doesn't use the Pluto package management. Just created a new notebook that uses |
@fonsp Done and tested. |
Awesome! Did you also test that JuliaFormatter works for the rest of the file? i.e. that |
I did! |
This is regularly the only change when I format my code/notebooks, and it gets reset whenever the notebook is saved. By telling JuliaFormatter to ignore it, it reduces noise in commits (if accidentally committed) and means I don't have to worry about formatting code I didn't write nor will I ever see.
I believe this is a good solution to #2623 as it solves the issue of files being constantly reformatted for those who use JuliaFormatter, and it does not affect those who do not. (Other than 2 extra lines in the notebook)
Closes #2623
Try this Pull Request!
Open Julia and type: