Formatting julia code in Pluto notebook cells?

Hi,

I have recently started using Pluto notebooks and am really enjoying it! I am having lots of fun actually! I love the reactive aspect of this notebook and also love the fact that I can bypass it when I want to by taking advantage of the scoping permitted with let blocks :smiling_face:. Any who…

I was just wondering if there is a way to format the Julia code within a Pluto notebook cell? I have searched around online and haven’t found anything regarding this subject (at least not obvious to me anyways). I tend to write pretty poorly formatted code on the fly and was hoping to take advantage of some sort of automated formatter that adheres to a style guide for Julia. I apologize if this is perceived as a dumb question.

Cheers,
RL

Could you just run JuliaFormatter on the notebook file itself? The notebook is just a normal Julia script.

1 Like

Great suggestion…I actually didn’t think about trying that. It wasn’t really the solution I was envisioning in my head, but I tried it and it worked! Thanks for the suggestion.

1 Like