jet.ark is an R plugin for Neovim, powered by the Ark jupyter kernel. jet.ark is an extension plugin for jet.nvim.
jet-ark.mp4
- R console implemented via Jet
- R 'expression' detection, allowing you to send units of code with a single keystroke
- A LSP server which is aware of your R session (e.g. providing completions for dataframe column names and other session-specific stuff)
- Resizable plots
-
:ArkHelp {topic}brings up a help viewer, powered by Ark'shelpcomm -
:ArkVarsbrings up a variables pane, powered by Ark'svariablescomm - Debug adaptor
- Connections pane
You'll need to install Ark and tell jet.ark where the binary lives. In the future this plugin will handle downloading Ark for you.
-- You'll need to include both jet.nvim and jet.ark
vim.pack.add({ "https://github.com/wurli/jet.nvim" })
vim.pack.add({ "https://github.com/wurli/jet.ark" })
require("jet").setup({})
require("jet.ark").setup({
ark_binary_path = "path-to-ark-binary",
})See jet.nvim for advice on creating keymaps, e.g. to send code to the R console.
You can open the R console using :Jet, or using jet.nvim's Lua api:
vim.keymap.set("n", "<leader>jr", function()
require("jet.api").get_kernel({ filetype = "r" }, function(k) k:term_toggle() end)
end, { desc = "Open R (Jet)" })Ark's LSP will start automatically and attach to any R buffer you have open.