R REPL in Zed (Linux)

1 min read Original article ↗

Run R code in ZED

Tested using Zed 0.144.4 on Ubuntu 22.04.4 LTS.

  1. Download the Ark R kernel 0.1.117
  2. Run the binary: ark --install
  3. Run jupyter-kernelspec list and find the path to ARK kernel
  4. Open ZED and install R Extension
  5. Open ZED and edit settings and insert the following code (update the exact path to Ark)
  "jupyter": {
    "enabled": true,
    "kernels": {
      "python": "/home/USER/.local/share/jupyter/kernels/python3",
      "R": "home/USER/.local/share/jupyter/kernels/ark"
    }
  }
  1. Open ZED keymap and map "Ctrl+Enter" (or preferred combination) to run code in REPL
[
{
  "context": "Editor",
  "bindings": {
    "ctrl-enter": "repl::Run"
  }
}
]
  1. Open .R file, select line(s) you wanna execute and hit "Ctrl+Enter"

image