Open jtpio opened 5 years ago
Agree
@ryantam626
Ryan, I am thinking to add a simple enhancement for R code, as R is commonly used stats language.
The idea is really simple as below:
And this solution requires R runtime installed on the client machine, should be working perfectly on both Mac and Linux. For Windows, I probably need to come up with a cmd script other than asking the user to install Cygwin.
Please let me know your thought.
I think the general idea is correct :+1:
I have tinkered with formatR a while back but never got around to finishing it, let me know if you need any help :smile:
It's good to hear back from you.
I am going to create a new issue later for PR and tracking purposes. I appreciate your offer for help too.
It would be nice to have the ability to format markdown cells. From that perspective, a general code formatter like Prettier is a great idea.
Regarding this, there is a new formatter for Julia inspired by black and similar formatters, and it's working great right now: https://github.com/domluna/JuliaFormatter.jl
Hope support for Julia with this formatter can be added in a near future. Julia, alongside Python and R is an excellent language to use in Jupyter.
@dialvarezs that will take me some time to implement, I took a look into it last weekend, Julia is pretty slow while it's compiling for the first time, to provide a better UX I would need to make it compile upfront before user use it for formatting.
@ryantam626 yes, you're right. Julia is a great language but has that issue of the precompilation time. If the formatter is executed without precompilation every time, it would be very slow indeed. Anyways, hope you can look into it.
And btw, great work with your extension!!! It's one of my fav jupyterlab extensions.
@dialvarezs rest assured I am indeed looking at this :+1: Also thanks for your kind words :smile:
Hey, @ryantam626
Thanks for the awesome extension. I recommend it to anyone I can.
Is there any news for Julia support? That would be highly appreciated!
Hi, @BexTuychiev
Sorry for the late reply, I haven't given this project much love, I just kinda lost steam over the years as I got increasingly burnt out, but lately I have gotten a second wind (perhaps only for a brief period...)
Is there any news for Julia support?
No, not yet, FWIW I am in middle to a big refactor for the project (mostly due to the evolution of jupyterlab's plugin tooling), additional formatters support would be one of the things I can look at after that.
Without the the refactor, the development envrionment for this plugin is just nightmare-ish to use, so that is currently trumping all tasks.
I would also be super interested in Julia, the language has made some significant advantages in terms of precompile times as well, so maybe the earlier concerns are not necessarily a problem anymore by now.
It would be interesting to make this extension able to format code written in other languages than Python, by: