ocsmit / zed-r

R language support for Zed editor
23 stars 2 forks source link

How do I use this? #8

Open bladerunnerwalrus opened 3 weeks ago

bladerunnerwalrus commented 3 weeks ago

I'm completely new to Zed and this extension. I use Rstudio for most tasks and typically work using .Rproj. I tried Sublime long time ago and there I could select code and send it to terminal with R session using a shortcut. I tried different combinations in Zed, but none seem to work. If there is any type of guide it would be very helpful. Thanks!

dwexel commented 3 weeks ago

you probably want to install a jupyter kernel for R, then make sure it's visible to zed by looking at the repl: sessions command and see it's there

IRkernel or ark

then you can open any R file and there should be the option to start REPL

https://zed.dev/docs/repl#changing-kernels https://zed.dev/blog/repl

bladerunnerwalrus commented 3 weeks ago

you probably want to install a jupyter kernel for R, then make sure it's visible to zed by looking at the repl: sessions command and see it's there

IRkernel or ark

then you can open any R file and there should be the option to start REPL

https://zed.dev/docs/repl#changing-kernels https://zed.dev/blog/repl

Thank you! Yes, I did this both for Python and R, and my code runs. The only thing is that with R the output is really verbose, even for something simple as print("Hello") it outputs what I assume is a surrounding function. This isn't a case with Python, e.g., plt.show() just outputs the plot. Did I do something wrong?